PDA

View Full Version : How do i get the rotation axis to follow my object?



10-28-2002, 01:42 AM
I have this object that i can move with translate, but when i rotate it, the axis always stick to the center of the screen. any ideas of how to get the axis to refresh and stick with the object would be really great, cos i seriously dont know what to do :P
if u have the answer plz send it to my email : jesperhoff@hotmail.com

Bob
10-28-2002, 01:53 AM
Any transformation in OpenGL is always performed about the world origin. If you want to, say, rotate about a point other than the origin (i.e. you want to rotate an object in it's current location), you first have to translate the object to the origin, perform the rotation there, and then translate it back.