From dd662f9c6ab376c1411ef5c703dfca08c069be2c Mon Sep 17 00:00:00 2001 From: Raul Santos Date: Sun, 3 Aug 2025 20:25:10 +0200 Subject: [PATCH] [.NET] Fix `Quaternion(Vector3, Vector3)` constructor when vectors are the same. --- modules/mono/glue/GodotSharp/GodotSharp/Core/Quaternion.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Quaternion.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Quaternion.cs index 334e35a4645..b662ab5d0b0 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Quaternion.cs +++ b/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();