matrix trouble when loading meshes with assimp

I’m trying to convert meshes into my own format using assimp; at first i thought that the node transformation matrix was part of the animation matrix chain multiplication; but it doesn’t seem to be, because my animations didn’t work when i included it and worked fine once i got rid of it. And i wanted to pre-transform the collision mesh by the bone offset matrix, because each collision mesh is only allowed to have one bone. And this worked fine, but i didn’t know what collision mesh went with what model. So I parented the collision data to the mesh so i could tell what went with what; and then the collision mesh wasn’t behaving correctly at all. And i suddenly seem to need to the transform matrixes to fix it and i don’t know why.

So the chain goes:


Root Node:
1 0 0 0
0 1 0 0
0 0 1 0 
0 0 0 1

Mesh Node
0 1 0 0
0 0 -1 0
-1 0 0 0
0 0 0 1

Collision Mesh Node
0 1 0 0
0 0 -1 0
-1 0 0 0
0 0 0 1

And to fix the bone offset matrix in the collision mesh i need to multiply it by this:


0 0 -1 0
1 0 0 0
0 -1 0 0
0 0 0 1

And I just don’t know where this matrix is coming from; i know it’s the transpose/inverse of the node/parent matrix, and the node/parent matricies multiplied together. So i need to set up my code to use one of those 5 things, but i don’t know which one or why.