From a67f3003de693998ab3ec9864383d7155175c353 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sun, 26 Mar 2023 14:07:42 +0200 Subject: [PATCH] Revert "Avoid some broken calculations for IBoneSceneNode positions." This was reported to cause broken models in some cases. reverts commit edb381bd5050712d1eb8875fe3a405000dd09a3d --- source/Irrlicht/CSkinnedMesh.cpp | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/source/Irrlicht/CSkinnedMesh.cpp b/source/Irrlicht/CSkinnedMesh.cpp index 07e86d6b..75e2ca64 100644 --- a/source/Irrlicht/CSkinnedMesh.cpp +++ b/source/Irrlicht/CSkinnedMesh.cpp @@ -1347,24 +1347,9 @@ void CSkinnedMesh::recoverJointsFromMesh(core::array &jointChil { IBoneSceneNode* node=jointChildSceneNodes[i]; SJoint *joint=AllJoints[i]; - - if ( joint->UseAnimationFrom ) // Seems to work better (else solution seems to mess up sometimes) and would be faster. Any disadvantage? - { - node->setPosition(joint->Animatedposition); - core::quaternion qrot = joint->Animatedrotation; - qrot.W *= -1.f; // Animation system uses right-handed rotations? Argh... - irr::core::vector3df euler; - qrot.toEuler(euler); - euler *= core::RADTODEG; - node->setRotation(euler); - node->setScale(joint->Animatedscale); - } - else - { - node->setPosition(joint->LocalAnimatedMatrix.getTranslation()); - node->setRotation(joint->LocalAnimatedMatrix.getRotationDegrees()); - node->setScale(joint->LocalAnimatedMatrix.getScale()); - } + node->setPosition(joint->LocalAnimatedMatrix.getTranslation()); + node->setRotation(joint->LocalAnimatedMatrix.getRotationDegrees()); + node->setScale(joint->LocalAnimatedMatrix.getScale()); node->positionHint=joint->positionHint; node->scaleHint=joint->scaleHint;