Fix incorrect Mat4 to Transform3D conversion

This commit is contained in:
Jarrod Doyle 2024-12-07 15:09:18 +00:00
parent df99a34d81
commit 7c38c876de
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
1 changed files with 1 additions and 1 deletions

View File

@ -13,6 +13,6 @@ public static class Utils
public static Godot.Transform3D ToGodotTransform3D(this Matrix4x4 mat, bool scale = true) public static Godot.Transform3D ToGodotTransform3D(this Matrix4x4 mat, bool scale = true)
{ {
var t = mat.Translation / (scale ? InverseScale : 1.0f); var t = mat.Translation / (scale ? InverseScale : 1.0f);
return new Godot.Transform3D(mat.M22, mat.M21, mat.M23, mat.M31, mat.M33, mat.M32, mat.M12, mat.M13, mat.M11, t.Y, t.Z, t.X); return new Godot.Transform3D(mat.M22, mat.M32, mat.M12, mat.M23, mat.M33, mat.M13, mat.M21, mat.M31, mat.M11, t.Y, t.Z, t.X);
} }
} }