Jump to content
  • Advertisement

Archived

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

Kiz

Question about matrix world rotation

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

Ok, here''s a newbie question... I have a kind of my own engine where I can load multiple objects to world, move them around, rotate them, play with camera e.t.c... Every object in the world has its "world" matrix which I modify when i move/rotate object in the world. The same matrix i mult. with OpenGL-s matrix before displaying my objects. The question that bothers me is how do I rotate my objects around world axsis translated to object coordinate? So actually I need some matrix math solved because I don''t want my rotation axis to rotate with object. Another simplification of my problem is: How to rotate already rotated matrix but just about "world axis X, Y, Z" translated to object position. I''m sure this is a simple matter but my math is somewhat weak.

Share this post


Link to post
Share on other sites
Advertisement
Gosh, it''s been a long time since I dealt with this one. The answer to your problem is quite simple. There is a 3x3 matrix which the elements of it are cosine and sine. It''s in every linear algebra text book. If you have more question, let me know.

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!