Jump to content
  • Advertisement
Sign in to follow this  
bengaltgrs

Rotate a unit vector 90degrees

This topic is 4836 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 been working at this for a while and I cannot seem to figure it out, although it seems to be so simple. Lets say I have any given unit vector, lets say (0, 0, -1), how would I find the unit vector 90degrees to the right of it? I thought that switching the Z and X coordiantes would work but it most definitely does not. -Chris

Share this post


Link to post
Share on other sites
Advertisement
In three dimensions there are an infinite number of vectors at 90 degress to a unit vector. You'll need to supply more information on the orientation of the new vector.

Share this post


Link to post
Share on other sites
Sorry about that, the vector is a 3D vector, but the Y value will always be 0, so it is actually a 2D problem. So I guess the question is how to rotate a 2D vector 90degrees to the right, given any arbitrary vector.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!