Skip to content

Commit 2f41534

Browse files
committed
Merge pull request #109281 from raulsntos/dotnet/fix-quaternion-ctor
[.NET] Fix `Quaternion(Vector3, Vector3)` constructor when vectors are the same
2 parents 45509c2 + dd662f9 commit 2f41534

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

modules/mono/glue/GodotSharp/GodotSharp/Core/Quaternion.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,10 @@ public Quaternion(Vector3 arcFrom, Vector3 arcTo)
576576
{
577577
if (d >= 0.0f)
578578
{
579+
X = 0.0f;
580+
Y = 0.0f;
581+
Z = 0.0f;
582+
W = 1.0f;
579583
return; // Vectors are same.
580584
}
581585
Vector3 axis = n0.GetAnyPerpendicular();

0 commit comments

Comments
 (0)