Jump to content
  • Advertisement
Sign in to follow this  

Rotate, then translate. Works or not?

This topic is 4707 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 would like to know if the following asssumption is true: to rotate about a certain point, you can first rotate it around the origin (which makes it a lot simpler to code) and then translate those coordinates to that center point. What I mean is, you have a set of base coordinates, for example (x, y, z) and you want to rotate those around a point (u, v, w) by (alpha=30, beta=30, gamma=30) (assume all angles in degrees) and what you do is take (x, y, z) and rotate them around the origin by (alpha, beta, gamma) e.g. z' = z cos alpha - y sin alpha y' = y cos alpha + z sin alpha x' = x cos beta - z' sin beta z' = z' cos beta + x sin beta then translate those coords by (u, v, w) x' = x' + u y' = y' + v z' = z' + w Thanks for any responses and Happy New Year!

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!