Converting 3 axis vectors to a rotation matrix

Posted by user38858 on Game Development See other posts from Game Development or by user38858
Published on 2013-11-09T21:24:05Z Indexed on 2013/11/09 22:12 UTC
Read the original article Hit count: 377

Filed under:
|
|

I am trying to get a rotation matrix (in 3dsmax) from 3 vectors that form an axis (all 3 vectors are aligned by 90 degrees each other)

Somewhere I read that I could build a rotation matrix just by inserting in every row one vector at a time (source: http://renderdan.blogspot.cz/2006/05/rotation-matrix-from-axis-vectors.html)

So, I built a matrix with these example vectors

x-axis : [-0.194624,-0.23715,-0.951778]

y-axis : [-0.773012,0.634392,0]

z-axis : [-0.6038,-0.735735,0.306788]

But for some reason, if I try to convert this matrix to eulerangles, I receive this rotation: (eulerAngles 47.7284 6.12831 36.8263) ... which is totally wrong, and doesn't align to my 3 vectors at all.

I know that rotation is quite difficult to understand, may someone shed some light? :)

© Game Development or respective owner

Related posts about rotation

Related posts about matrix