object local coordinate axis rotation
Hi.
I''m so confused .... I''m working on an object viewer and having trouble getting an object to rotate about its own coordinate system. I''ve a simple pyramid model and i start of looking at the back of the model with it pointing into the screen. I want to be able to rotate it 90 degrees about its own Y axis so its then pointing to the left ... then rotate it about its own X axis so it pitches up and down.
What I get instead, is the object rotating about what appears to be the world X axis or the model''s Z axis.
I''ve tried reversing the order of the glTranslate() glRotate() operations and that didn''t do the trick. I tried representing the object''s orientation in a quaternion but that didnt do it. I''ve tried translating it back to the global origin before applying the rotations and that didn''t work.
The one thing I have not done, is maintain seperate view and model transforms and doing all the rotations using a local object matrix, then multiplying the view matrix in my render code ... main reason being that im trying to concentrate on the object stuff and just use the simple camera system based on eulers until im ready to tackle the camera.
I plan on doing a space shooter and it seems natural to me that i should always be able to rotate about a fixed object local coordinate system, and apply forces along those axes ... what am I missing??????????
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement