Hello
I am having quite a hard time getting my head around the transformation Matrices I have to apply to the verteces of a model to bring it back to its pivot for submeshes that defines collision boxes
for eg :
Mesh A has a pivot in max
SubMesh1 is a partial collision mesh
SubMesh2 is a partial collision mesh
When importing the MeshA I am using this matrix to apply on control point and it works fine ( I get the Pivot where I want and all is epxressed against it ). This matrix is defined as such
Translation = Node->GetGeometricTranslation(FbxNode::eSOURCE_SET);
Rotation = Node->GetGeometricRotation(FbxNode::eSOURCE_SET);
Scaling = Node->GetGeometricScaling(FbxNode::eSOURCE_SET);
Geometry.SetT(Translation);
Geometry.SetR(Rotation);
Geometry.SetS(Scaling);
then on submodel this becomes tricky as I am applying same SubNode's Matrix and multiply it with parents matrix as computed above.
=> Sometimes it work like a charm and I get nice collision boxes around my model while sometimes, on other models Collision boxes are all messed up.
When this happens, I got some movement in the ( Local Translation for eg ) that I migth have forgotten to include ?
Anyway, Overall the idea is to compute a matrix transformation that I could apply in submesh to put them in the pivot frame of its master. What should I do ?
thanks
Solved! Go to Solution.
Never better served than by myself 🙂
So
1) the Parent mesh gets its pivot orientation ( geo ) applied to its raw verteces
2) Child gets only their Local * Geo transformation
and there we go all expressed to the origin but shifted to the pivot frame !
Can't find what you're looking for? Ask the community or share your knowledge.