Another fix related to LightWave ZXY rotation order and Heading, Pitch, Bank convention.
parent
0a317b944e
commit
855e4bc480
|
@ -243,14 +243,13 @@ void AnimResolver::ExtractBindPose(aiMatrix4x4& out)
|
||||||
if (scale_z) scaling.z = scale_z->keys[0].value;
|
if (scale_z) scaling.z = scale_z->keys[0].value;
|
||||||
|
|
||||||
// build the final matrix
|
// build the final matrix
|
||||||
aiMatrix4x4 s,r,t;
|
aiMatrix4x4 s,rx,ry,rz,t;
|
||||||
|
aiMatrix4x4::RotationZ(angles.z, rz);
|
||||||
r.FromEulerAnglesXYZ(angles);
|
aiMatrix4x4::RotationX(angles.y, rx);
|
||||||
//aiMatrix4x4::RotationY(angles.y,r);
|
aiMatrix4x4::RotationY(angles.x, ry);
|
||||||
// fixme: make FromEulerAngles static, too
|
|
||||||
aiMatrix4x4::Translation(translation,t);
|
aiMatrix4x4::Translation(translation,t);
|
||||||
aiMatrix4x4::Scaling(scaling,s);
|
aiMatrix4x4::Scaling(scaling,s);
|
||||||
out = s*r*t;
|
out = t*ry*rx*rz*s;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue