From f86c52c021a1ae732ca56ca9a1b43ee79d85ba19 Mon Sep 17 00:00:00 2001 From: biwa <6475593+biwa@users.noreply.github.com> Date: Mon, 7 Feb 2022 22:10:34 +0100 Subject: [PATCH] UDBScript: fixed a bug in Vector3D's crossProduct method that resulted in wrong calculations --- Source/Plugins/UDBScript/API/Vector3DWrapper.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/Plugins/UDBScript/API/Vector3DWrapper.cs b/Source/Plugins/UDBScript/API/Vector3DWrapper.cs index 1fe3686c..030d7997 100644 --- a/Source/Plugins/UDBScript/API/Vector3DWrapper.cs +++ b/Source/Plugins/UDBScript/API/Vector3DWrapper.cs @@ -452,7 +452,11 @@ namespace CodeImp.DoomBuilder.UDBScript.Wrapper Vector3D a1 = (Vector3D)BuilderPlug.Me.GetVectorFromObject(a, true); Vector3D b1 = (Vector3D)BuilderPlug.Me.GetVectorFromObject(b, true); - return new Vector3DWrapper(a1.y * b1.x - a1.z * b1.y, a1.z * b1.x - a1.x * b1.z, a1.x * b1.y - a1.y * b1.x); + return new Vector3DWrapper( + a1.y * b1.z - a1.z * b1.y, + a1.z * b1.x - a1.x * b1.z, + a1.x * b1.y - a1.y * b1.x + ); } catch (CantConvertToVectorException e) {