I noticed that when I load a collada model in my engine, it appears mirrored compared to how other systems such as Unity load it in.
I fixed this by negating Z as I import positions and normals and it’s now loading in and rendering correctly. The problem is the animations. When the model loaded as a mirror image, the animations worked correctly but, as expected with this z change, they are playing out in a very strange way, the character faces toward you but is animated back to front, if that makes sense.
To fix this I thought I’d just mirror the animation matrices and inverse bind matrices on the XY plane but this doesn’t seem to work. I did that by converting each matrix to a quarternion, negating the quarternion vector’s Z and converting the resultant quaternion back to a matrix. I did this also for the position or translation part of the matrix. I did this for both animation matrices and inverse bind matrices but it didn’t work properly. Now my character not only walks back to front but also waves his arms in the air erratically. Looks funny but not what I’m after.
Has anyone had to do anything similar with collada or any of the other formats? I’m sure I’m not doing the right thing although I can’t think why it would be wrong…
Thanks