Jump to content
  • Advertisement


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


object local coordinate axis rotation

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

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??????????

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!