From 89a30532b7b7d0d41c5fc72375b2c63c3c8cb800 Mon Sep 17 00:00:00 2001 From: elsid Date: Sat, 22 Jun 2024 03:38:03 +0200 Subject: [PATCH] Fix getAnglesZYX implementation --- components/lua/utilpackage.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/lua/utilpackage.cpp b/components/lua/utilpackage.cpp index e9b8e886d2..a93262bb03 100644 --- a/components/lua/utilpackage.cpp +++ b/components/lua/utilpackage.cpp @@ -240,7 +240,7 @@ namespace LuaUtil return std::make_tuple(angles.x(), angles.z()); }; transMType["getAnglesZYX"] = [](const TransformM& m) { - osg::Vec3f angles = Misc::toEulerAnglesXZ(m.mM); + osg::Vec3f angles = Misc::toEulerAnglesZYX(m.mM); return std::make_tuple(angles.z(), angles.y(), angles.x()); }; @@ -276,7 +276,7 @@ namespace LuaUtil return std::make_tuple(angles.x(), angles.z()); }; transQType["getAnglesZYX"] = [](const TransformQ& q) { - osg::Vec3f angles = Misc::toEulerAnglesXZ(q.mQ); + osg::Vec3f angles = Misc::toEulerAnglesZYX(q.mQ); return std::make_tuple(angles.z(), angles.y(), angles.x()); };