From 4a394a391bffa5b5bee1bab2e3ed43ae6a0e8465 Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Tue, 4 Jun 2024 18:44:55 +0300 Subject: [PATCH] Fix SetAngle alternative axis order --- apps/openmw/mwscript/transformationextensions.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwscript/transformationextensions.cpp b/apps/openmw/mwscript/transformationextensions.cpp index 7144147843..bf09269f1e 100644 --- a/apps/openmw/mwscript/transformationextensions.cpp +++ b/apps/openmw/mwscript/transformationextensions.cpp @@ -168,7 +168,7 @@ namespace MWScript float az = ptr.getRefData().getPosition().rot[2]; // XYZ axis use the inverse (XYZ) rotation order like vanilla SetAngle. - // UWV axis use the standard (ZYX) rotation order like TESCS/OpenMW-CS and the rest of the game. + // UVW axis use the standard (ZYX) rotation order like TESCS/OpenMW-CS and the rest of the game. if (axis == "x") MWBase::Environment::get().getWorld()->rotateObject( ptr, osg::Vec3f(angle, ay, az), MWBase::RotationFlag_inverseOrder); @@ -181,10 +181,10 @@ namespace MWScript else if (axis == "u") MWBase::Environment::get().getWorld()->rotateObject( ptr, osg::Vec3f(angle, ay, az), MWBase::RotationFlag_none); - else if (axis == "w") + else if (axis == "v") MWBase::Environment::get().getWorld()->rotateObject( ptr, osg::Vec3f(ax, angle, az), MWBase::RotationFlag_none); - else if (axis == "v") + else if (axis == "w") MWBase::Environment::get().getWorld()->rotateObject( ptr, osg::Vec3f(ax, ay, angle), MWBase::RotationFlag_none); }