Jump to content
  • Advertisement
Sign in to follow this  
adriansnetlis

Direction Vector from Euler Angles

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have 3 angles - x, y and z rotations. I need to get the direction vector for 3 local axis - x, y and z. Sounds simple, right? However, I can't find any signs of info about this in 3D. It's only telling about single angle(for 2D) everywhere, but not for 3 angle sets(3D). So how do I do it?

Share this post


Link to post
Share on other sites
Advertisement

You can apply the three rotations to the vectors (1,0,0), (0,1,0) and (0,0,1) and see where they end up. You either need that or the same thing but applying the inverse of the rotation, I am not sure from your post.

Share this post


Link to post
Share on other sites

You can construct multiple rotations from the euler angles, depending on the order of consecutive rotations (their multiplications that is).

If you know your order, just construct your rotation matrix and then the three columns of this matrix are exactly the direction unit vectors of respective axises when they are rotated with it.

While also, the rows of this rotation matrix are direction vectors of axises when they undercome inverse of rotation, or you can interpret the rows as directions of original axises in new base space - if the new rotation becomes the base.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!