Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commite8beb5604c

README.md

math.cross (procNode)

The cross product of two Vec3 values: the vector perpendicular to both, per element.

The cross operation of the authoring surface, called through the Luau node on proc.fieldc.operators. Operands are numbers, vectors, Columns or Fields. When every operand is a plain number or vector the answer is the plain result, folded where the node cooks; otherwise the answer is a Field: a template over its operands that whatever reads it evaluates in one dispatch together with the chain around it. Nothing dispatches for this node alone. Over numbers and animated values the answer is an animated value: the operation at every time.

The answer always has three components; a narrower operand reads 0 for the components it lacks.

Inputs

  • a (Value, default 0). The first vector.
  • b (Value, default 0). The second vector.

Outputs

  • value. A Vec3.
local value = g.math.cross(g.math.vec3(1, 0, 0), g.math.vec3(0, 1, 0)) -- (0, 0, 1)