Skip to content

Commit

Permalink
Fix Incorrect matrix multiplication order.
Browse files Browse the repository at this point in the history
As showcased in issue #4 the order of multiplication for the model matrix was the root cause of the false positioning of transforms.
  • Loading branch information
realQuartzi committed Jun 7, 2024
1 parent 57c6f0c commit 993c611
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Influence.Core/Components/Transform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ void UpdateModelMatrix()
Matrix4x4 rotationMatrix = _rotation.ToRotationMatrix();
Matrix4x4 translationMatrix = Matrix4x4.CreateTranslate(_position);

modelMatrix = translationMatrix * rotationMatrix * scaleMatrix;
modelMatrix = rotationMatrix * scaleMatrix * translationMatrix ;
}

#endregion
Expand Down

0 comments on commit 993c611

Please sign in to comment.