Jump to content
  • Advertisement

Archived

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

ByteMe95

Matrix multiplication order

This topic is 6115 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, I have a lot of matrices that need to be combined in order to get my final transform matrix of an object. I have to do a translation then a Quaternion axis+angle rotation matrix then a possible scaling then I have to throw in the current world transform matrix which is user controlled (for rotations, zoom in/out) and throw it in. The question is, what the heck is ordering based on can I can clearly see that the outcome is different depending on what order I do everything, so is there some kind of general rule or something? ByteMe95::~ByteMe95() Cerebrum Software

Share this post


Link to post
Share on other sites
Advertisement
Do everything backwards in order from the final matrix. If you want to do the following in this order:
[1] translation
[2] rotation
[3] scale
[4] view

then it computed by [3][2][1][4].

Just write the code backwards (up) from the final matrix.

Hope this helps.

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!