Fix for issue 4454, MatrixDecompose() gave incorrect output for certain combinations of scale and rotation (#4461)

This commit is contained in:
waveydave 2024-11-03 19:36:32 +00:00 committed by GitHub
parent 6028052c7e
commit 66a4f2e90b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -2569,7 +2569,13 @@ RMAPI void MatrixDecompose(Matrix mat, Vector3 *translation, Quaternion *rotatio
if (!FloatEquals(det, 0))
{
clone.m0 /= s.x;
clone.m4 /= s.x;
clone.m8 /= s.x;
clone.m1 /= s.y;
clone.m5 /= s.y;
clone.m9 /= s.y;
clone.m2 /= s.z;
clone.m6 /= s.z;
clone.m10 /= s.z;
// Extract rotation