#### Archived

This topic is now archived and is closed to further replies.

# Vectors and Angles

This topic is 5545 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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??

##### Share on other sites
xy = atan2( y, x )
yz = atan2( z, y )
zx = atan2( x, z )

##### Share on other sites
How about an explanation to go with those math functions. Let''s not leave me in the dark!!!

##### Share on other sites
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....

##### Share on other sites
have you ever used a programming languages math function? of course its in radians...

##### Share on other sites
"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.

##### Share on other sites
I did that on purpose, thank you very much!!!

1. 1
Rutin
37
2. 2
3. 3
4. 4
5. 5

• 12
• 10
• 13
• 104
• 11
• ### Forum Statistics

• Total Topics
632983
• Total Posts
3009697
• ### Who's Online (See full list)

There are no registered users currently online

×