1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 15:29:55 +00:00

Fix getAnglesZYX implementation

This commit is contained in:
elsid 2024-06-22 03:38:03 +02:00
parent 40dee30596
commit 89a30532b7
No known key found for this signature in database
GPG key ID: 4DE04C198CBA7625

View file

@ -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());
};