Fix getAnglesZYX implementation

pull/3236/head
elsid 6 months ago
parent 40dee30596
commit 89a30532b7
No known key found for this signature in database
GPG Key ID: 4DE04C198CBA7625

@ -240,7 +240,7 @@ namespace LuaUtil
return std::make_tuple(angles.x(), angles.z()); return std::make_tuple(angles.x(), angles.z());
}; };
transMType["getAnglesZYX"] = [](const TransformM& m) { 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()); return std::make_tuple(angles.z(), angles.y(), angles.x());
}; };
@ -276,7 +276,7 @@ namespace LuaUtil
return std::make_tuple(angles.x(), angles.z()); return std::make_tuple(angles.x(), angles.z());
}; };
transQType["getAnglesZYX"] = [](const TransformQ& q) { 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()); return std::make_tuple(angles.z(), angles.y(), angles.x());
}; };

Loading…
Cancel
Save