I have a problem for First Person Shooter Starter Kit

Why is “Math.atan(temp.y)” used here

Hi @Shpz and welcome,

That’s some trigonometry to calculate the initial azimuth/elevation (yaw/pitch) of the camera, so later on when input starts coming in the scripts add the delta only.

Thanks reply, my english is bad, please excuse me. I didn’t understand the gemotric meaning here.

1 Like

The place marked by the red line

Yes, that’s the trigonometry, check here for more: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/atan

1 Like