Skip to main content
GameDev.net gamedev.net
🔒 Locked

Matrix Multiplication

Started by Spanky Oct 25, 2000 at 7:18 AM 0 replies 450+ views
Original Post
Spanky
Spanky
Ok, I have been reading a bit of stuff about matrix''s and stuff and here''s what I think I have come up with. To do a translation, you would multiple by | 1 0 0 0 | | 0 1 0 0 | | 0 0 1 0 | | x x x 1 | where X is however far you want to move. Than, if you want to rotate something on Z, you multiply by this one
| cos t   sin t   0   0  |
|-sin t   cos t   0   0  |
|  0       0      1   0  |
|  0       0      0   1  |
am I right so far? Ok, now lets say we wanted to use these for our camera position. If we were at 0, 0, 0 and wanted to move 10 units in any direction, and we were at an angle 45 on the X axis (facing half way to straight up) we would multiply the translation one with 10 in the 3 bottom spots by the rotation around the X axis matrix and than finally by our own camera matrix. Is that correct? Hopefully it is but if it''s not, a little help would be cool. Shawn

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.