Jump to content
  • Advertisement

Archived

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

shakazed

Rotation

This topic is 5572 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

Advertisement
Guest Anonymous Poster
rotate before you translate

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Say that you have an object at v, then you do the following: translate by -v, rotate, and translate by v. This will move the object to the world center, rotate around the world center (which now also is the object center), and translate the object back. Okay?

Share this post


Link to post
Share on other sites
quote:
Original post by shakazed
Appareantly using glRotate functions rotate the object around the world origin. But what to do if you want to rotate objects around their own xyz axis?


glrotate will rotate around the objects center, but if you first rotate and then translate it will translate along the NEW axes. so first bring it into position and then rotate it.

Share this post


Link to post
Share on other sites

  • 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!