From 891adc92c753a4aa47ec2b6e57730d17aad66509 Mon Sep 17 00:00:00 2001 From: DBooots Date: Wed, 18 Feb 2026 23:17:22 -0600 Subject: [PATCH] Fix Quaternion constructor argument order LoadDump method The Unity Quaternion being constructed here takes arguments in the order of X, Y, Z, W. There was a bug here that provided them in the order of W, X, Y, Z, which will make the created Quaternion incorrect. Fixes https://github.com/KSP-KOS/KOS/issues/3161 --- src/kOS/Suffixed/Direction.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/kOS/Suffixed/Direction.cs b/src/kOS/Suffixed/Direction.cs index 013edcb82..d644d628f 100644 --- a/src/kOS/Suffixed/Direction.cs +++ b/src/kOS/Suffixed/Direction.cs @@ -261,11 +261,11 @@ public override Dump Dump() public override void LoadDump(Dump dump) { Rotation = new Quaternion( - (float)Convert.ToDouble(dump[DumpQuaternionW]), (float)Convert.ToDouble(dump[DumpQuaternionX]), (float)Convert.ToDouble(dump[DumpQuaternionY]), - (float)Convert.ToDouble(dump[DumpQuaternionZ]) + (float)Convert.ToDouble(dump[DumpQuaternionZ]), + (float)Convert.ToDouble(dump[DumpQuaternionW]) ); } } -} \ No newline at end of file +}