Game Development Community

Limit vertical camera angle

by Ingo Seidel · in Torque Game Engine Advanced · 05/26/2009 (8:45 am) · 1 replies

Hi,

is it possible to limit the vertical camera angle of the player such that the player can only look 60 degrees up and down? If yes, on which object would I need to set the angle (the player, the camera, the datablock?) and which variable controls the angle?

thanks

#1
05/26/2009 (9:11 am)
In the player datablock:
minLookAngle = -1.4;
maxLookAngle = 1.4;

But be aware that these values are not in degrees, but in radians.
1 radians = 57.2957795 degrees (I think. It's been a while so you might want to verify that.)
So 60 degrees would be 1.047197551 radians.