The up-vector in look_at

Green BaronGreen Baron Posts: 19Member
edited August 2016 in Programming
<br />Like maybe everyone else before me i've played with a camera and the up-vector in the look_at method (Spatial):<br />- I don't know how the camera is oriented when it's 0,0,0 (undefined ?)<br />- the x and z components in conjunction rotate the camera around x, x is dominant near the x-axis, z near the z.axis.<br />- y has a "binary" effect. The camera is either upside up or down<br /><br />To summarize it: a good up-Vector is 0,1,0. The camera is on it's feet, no rotation around x. Trivial. Somehow i thought there was more about it.<br /><br />Or is there ?<br /><br />
Tagged:

Tags :

Comments

  • PlanetKillerPlanetKiller Posts: 25Member
    When you add a new camera node, its rotation is set to (0,0,0), you should also be able to set the rotation to (0,0,0). I believe that all rotations have positive and negative values, but there is a deg2rad() and rad2deg() functions to change degrees and radians to the other. In both flight and camera rotation I have to set if statements for both positive and negative values. Both for getting rotations correct and to ensure that some rotations do not go beyond a specified range. I hope this helps you somewhat.
Sign In or Register to comment.