Skip to content

Commit b6e4758

Browse files
authored
Fix Quaternion constructor argument order LoadDump method (#3165)
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 #3161
1 parent 00ccd86 commit b6e4758

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/kOS/Suffixed/Direction.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,11 +261,11 @@ public override Dump Dump()
261261
public override void LoadDump(Dump dump)
262262
{
263263
Rotation = new Quaternion(
264-
(float)Convert.ToDouble(dump[DumpQuaternionW]),
265264
(float)Convert.ToDouble(dump[DumpQuaternionX]),
266265
(float)Convert.ToDouble(dump[DumpQuaternionY]),
267-
(float)Convert.ToDouble(dump[DumpQuaternionZ])
266+
(float)Convert.ToDouble(dump[DumpQuaternionZ]),
267+
(float)Convert.ToDouble(dump[DumpQuaternionW])
268268
);
269269
}
270270
}
271-
}
271+
}

0 commit comments

Comments
 (0)