No, not a homework, and yeah, wasting a life with this, googling and trying because my math is a ... Please help me. I have Matrix4x4 data input comming from .X files what I want to use in Unity.
So let's say I read those 16 floats like:
Matrix4x4 mx = Matrix4x4.identity;
mx[0,0] = readfloat();
mx[1,0] = readfloat();
mx[2,0] = readfloat();
//...
mx[2,3] = readfloat();
mx[3,3] = readfloat();
return mx;
Using original values leads to have .X animations mirrored on Z axis (like right arm animation has left arm names, etc.).
So I heard, to convert data, I have to switch handedness, and closest I got was: -readfloat();
next to mx[...]
: m20
, m21
, m02
, m12
, m23
, and also all vertices negated on z, but final mx
was still not good.
If anyone has experience with this, can help me out with the right negations?
Or maybe I missed to switch read order too? Some pages say that some conversions require to switch y with z, etc. Kinda clueless here :(