1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Use matrix4::getRotationRadians

This commit is contained in:
Lars Mueller 2025-01-30 14:11:16 +01:00 committed by sfan5
parent b6c71b2379
commit d74af2f1a7
10 changed files with 34 additions and 28 deletions

View file

@ -30,7 +30,7 @@ public:
v3f res;
// First rotate by m_rotation, then rotate by the automatic rotate yaw
(core::quaternion(v3f(0, -m_rotation_add_yaw * core::DEGTORAD, 0))
* core::quaternion(rot.getRotationDegrees() * core::DEGTORAD))
* core::quaternion(rot.getRotationRadians()))
.toEuler(res);
return res * core::RADTODEG;
}