Fixed cross product formula

Components should be multiplied when calculating the cross product, not added.
(cherry picked from commit dccd2ac732)
This commit is contained in:
Aidan Mueller
2017-01-08 12:44:39 +01:00
committed by Rémi Verschelde
parent 2de3a118a6
commit 69fef6ce21
+3 -3
View File
@@ -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: