PDA

View Full Version : Rotation not on the 0,0,0 axis



tzano
02-03-2004, 09:57 AM
I just started coding opengl a few days ago. I have an object that is situated so its center is at the orgin. I want to "tilt" the object, sortof like rotating along a fixed point other than the orgin. (i.e a toll gate rising).

Do I translate the object half its length to put the orgin at the end of the object. Then rotate along x?

dorbie
02-03-2004, 11:45 AM
Translate the pivot point to the origin, rotate then translate back.

tzano
02-03-2004, 11:55 AM
thanks