diff --git a/code/OgreImporter.cpp b/code/OgreImporter.cpp index 3161a9140..a1dddb822 100644 --- a/code/OgreImporter.cpp +++ b/code/OgreImporter.cpp @@ -874,17 +874,18 @@ aiNode* OgreImporter::CreateAiNodeFromBone(int BoneId, const std::vector & void Bone::CalculateWorldToBoneSpaceMatrix(vector &Bones) { //Calculate the matrix for this bone: + aiMatrix4x4 t0,t1; if(-1==ParentId) { - WorldToBoneSpace= aiMatrix4x4::Translation(Position, aiMatrix4x4()) - * aiMatrix4x4::Rotation(RotationAngle, RotationAxis, aiMatrix4x4()) + WorldToBoneSpace= aiMatrix4x4::Translation(Position, t0) + * aiMatrix4x4::Rotation(RotationAngle, RotationAxis, t1) ; } else { WorldToBoneSpace= Bones[ParentId].WorldToBoneSpace - * aiMatrix4x4::Translation(Position, aiMatrix4x4()) - * aiMatrix4x4::Rotation(RotationAngle, RotationAxis, aiMatrix4x4()) + * aiMatrix4x4::Translation(Position, t0) + * aiMatrix4x4::Rotation(RotationAngle, RotationAxis, t1) ; }