Vectors and Angles

Started by
5 comments, last by dagamer34 20 years, 8 months ago
I was wanting to know how to get the angle out of a vector on a certain plane, like the x-z plane or the y-z plane. I need this so i can move and rotate my camera correctly to where it is aligned with the x axis, then rotate it along the z axis so and rotate and move it back so it seems like i was rotating the camera up and down. Don''t worry if i confused you. Just need the angle of a vector on a plane like x-z and y-z. Anybody know how to do it??
Advertisement
xy = atan2( y, x )
yz = atan2( z, y )
zx = atan2( x, z )
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!
How about an explanation to go with those math functions. Let''s not leave me in the dark!!!
hey, these functions are giving off wierd values. Like i tested the values 1 and 1 which we all know is 45 degrees and it gave me 0.785398. It''s almost as if they are in radians....
have you ever used a programming languages math function? of course its in radians...
"hey, these functions are giving off wierd values. Like i tested the values 1 and 1 which we all know is 45 degrees and it gave me 0.785398. It''s almost as if they are in radians.... "

LOL

wise saying: If a result is almost what you think it is then why can''t it be what you think it is.
I did that on purpose, thank you very much!!!

This topic is closed to new replies.

Advertisement