• Advertisement

Archived

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

Rotation

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