DocsNodesVectors

Vector Measure

Turns two directions into a single number: how far apart, or how much they agree.

dot product, distance, length, angle, facing, how far apart
Category
Vectors
Outputs
value
Runs live in
no target yet

Length and Distance are the obvious ones. Dot is the workhorse: it is positive when two directions point the same way, zero when they are at right angles, and negative when they oppose. That makes it the test for whether a face is pointing towards something.

Angle gives the same relationship in radians, which is what you want when the number is going to drive a rotation rather than a threshold.

Inputs

SocketTypeWiring
avectorone wire covers ax, ay, az
bvectorone wire covers bx, by, bz

Parameters

NameTypeDefaultAvailable whenWhat it does
Operationdot | length | distance | angledotalways
Xnumber0always
Ynumber0always
Znumber0always
Xnumber0always
Ynumber0always
Znumber0always

Built with this node

Nothing in the manual is built around this node yet.

See also

  • vectorMathWhen the answer should be a vector rather than a number.
  • compareTo turn the number into a yes or no selection.

Open the editor and try it