mirror of
https://github.com/stan220/godot-docs.git
synced 2026-09-08 21:29:07 +00:00
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:
committed by
Rémi Verschelde
parent
2de3a118a6
commit
69fef6ce21
@@ -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:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user