# Skel. animation.. Rotation order... Convert from YXZ to XZY

This topic is 4234 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

HELP dudes ! I use skeletal animations in my game.. (i make them in 'Anim8or' program :D) joint rotation order is XZY.. works ok.. example: glRotatef(BP_Head.X, 1, 0, 0); glRotatef(BP_Head.Z, 0, 0, 1); glRotatef(BP_Head.Y, 0, 1, 0); ripped some animations from old game on Sony PlayStation.. :P but they use YXZ rotation order ! worx ok with: glRotatef(BP_Head.Y, 0, 1, 0); glRotatef(BP_Head.X, 1, 0, 0); glRotatef(BP_Head.Z, 0, 0, 1); i need to ADAPT them for my XZY order.. how to convert values ? i need these anims ! =(

##### Share on other sites
Multiply them out into a rotation matrix (using their order), then extract the euler angles (in your order) from that matrix.

##### Share on other sites
yeh i tried this thing..

http://www.geometrictools.com/Documentation/EulerAngles.pdf

how to extract euler angles from matrix..
but i got sh!t. i got almost all values near zero... 0.0023, 0.000123, -0.3123100... etc.. whats wrong ?
im not so good in math. =(

entered my matrix 4x4 ( float M[16] )values in that r00.. r21... r02, r12

like this - r00 = M[0] r01 = M[1] r10 = M[4] r11 = m[5]..

everything looks right... =((

##### Share on other sites
o ya. now worx ok.. delete this thread if ya want :D

1. 1
2. 2
3. 3
Rutin
15
4. 4
5. 5

• 13
• 26
• 10
• 11
• 9
• ### Forum Statistics

• Total Topics
633725
• Total Posts
3013561
×