2
0
Эх сурвалжийг харах

Merge pull request #109281 from raulsntos/dotnet/fix-quaternion-ctor

[.NET] Fix `Quaternion(Vector3, Vector3)` constructor when vectors are the same
Thaddeus Crews 1 сар өмнө
parent
commit
2f41534fa6

+ 4 - 0
modules/mono/glue/GodotSharp/GodotSharp/Core/Quaternion.cs

@@ -576,6 +576,10 @@ namespace Godot
             {
                 if (d >= 0.0f)
                 {
+                    X = 0.0f;
+                    Y = 0.0f;
+                    Z = 0.0f;
+                    W = 1.0f;
                     return; // Vectors are same.
                 }
                 Vector3 axis = n0.GetAnyPerpendicular();