From 69fef6ce215ea4f6c1fc3e4e2f3d676bbb862bd6 Mon Sep 17 00:00:00 2001 From: Aidan Mueller Date: Wed, 21 Dec 2016 20:53:36 -0600 Subject: [PATCH] Fixed cross product formula Components should be multiplied when calculating the cross product, not added. (cherry picked from commit dccd2ac732f3712fe277c827d301ab257fc0d90a) --- tutorials/vector_math.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tutorials/vector_math.rst b/tutorials/vector_math.rst index e845eb1fa..cb9dc679e 100644 --- a/tutorials/vector_math.rst +++ b/tutorials/vector_math.rst @@ -676,9 +676,9 @@ The formula for the cross product is: :: var c = Vector3() - c.x = (a.y + b.z) - (a.z + b.y) - c.y = (a.z + b.x) - (a.x + b.z) - c.z = (a.x + b.y) - (a.y + b.x) + c.x = (a.y * b.z) - (a.z * b.y) + c.y = (a.z * b.x) - (a.x * b.z) + c.z = (a.x * b.y) - (a.y * b.x) This can be simplified, in Godot, to: