From a4f1e7d91884e5c82f72f44d464b16f6adfbfcfd Mon Sep 17 00:00:00 2001 From: Dave Corley Date: Wed, 31 Jul 2024 05:02:52 -0500 Subject: [PATCH] FIX(rotatecontroller): Actually accounting for scale breaks biped creatures --- apps/openmw/mwrender/rotatecontroller.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/apps/openmw/mwrender/rotatecontroller.cpp b/apps/openmw/mwrender/rotatecontroller.cpp index 471c5d54bd..0e84087710 100644 --- a/apps/openmw/mwrender/rotatecontroller.cpp +++ b/apps/openmw/mwrender/rotatecontroller.cpp @@ -37,15 +37,12 @@ namespace MWRender osg::Matrix matrix = node->getMatrix(); osg::Quat worldOrient; - osg::Vec3d worldScale(1.0, 1.0, 1.0); - osg::NodePathList nodepaths = node->getParentalNodePaths(mRelativeTo); if (!nodepaths.empty()) { osg::Matrixf worldMat = osg::computeLocalToWorld(nodepaths[0]); worldOrient = worldMat.getRotate(); - worldScale = worldMat.getScale(); } osg::Quat worldOrientInverse = worldOrient.inverse(); @@ -54,8 +51,6 @@ namespace MWRender matrix.setRotate(orient); matrix.setTrans(matrix.getTrans() + worldOrientInverse * mOffset); - matrix *= osg::Matrix::scale(worldScale); - node->setMatrix(matrix); // If we are linked to a bone we must call setMatrixInSkeletonSpace