Game Designer & Developer


Game Dev

Cross Product

A×B=A×B×sinθ×N^\vec{A}\times\vec{B} = \|\vec{A}\|\times\|\vec{B}\|\times\sin\theta\times\widehat{\vec{N}}
Where N\vec{N} is perpendicular to the A\vec{A}, B\vec{B} plane.

A×B\vec{A}\times\vec{B} produces a vector perpendicular to both vectors, in the direction of the chirality of your coordinate system. For example, if A\vec{A} is thumb and B\vec{B} is index, then A×B\vec{A}\times\vec{B} will point in the direction of the middle finger. The magnitude of A×B\vec{A}\times\vec{B} is the area of the parallelogram of ABAB\vec{A}\vec{B}\vec{A}\vec{B}, i.e. two vectors along the positive XX and YY axes of lengths 22 and 33 would produce a cross product along the positive ZZ axis of length 66.

For normalised vectors, the magnitude of the cross product is equal to the sine of the angle between them.

The cross product follows the following rules: