PDA

View Full Version : Heading origin...



orendavd
02-26-2008, 08:05 AM
what is the origin when I rotate my object, what is the "zero angle"??? is there a way to change this reference point to somewhere else??

Y-tension
02-26-2008, 02:48 PM
The origin is always at (0,0,0). If you want to change the origin to, say (x,y,z) you must:
1)Translate(-x,-y,-z)
2)Rotate
3)Translate(x,y,z)

Of course these transformations will appear in reverse order in your OpenGL code (matrices in OpenGL post-multiply).

orendavd
02-27-2008, 03:04 AM
u say no other way to do it???
10x