Skip to main content
Version: 3.9.0

Dot

dot

Use Dot to calculate the dot product between two vectors. For example, the dot product of vector A [1, -3, -2] and B [5, -1, 1] is:[1, -3, -2] · [5, -1, 1] = (1 x 5) + (-3 x -1) + (-2 x 1) = 6Supported types: Vec2, Vec3, and Vec4. Dot is in the Math category.

Input

NameData TypeDescription
AVec4The first vector.
BVec4The second vector.

Output

NameData TypeDescription
ResultVec4The result of the cross product.

Example

dot example

The cube’s rotation is controlled by the position of the sphere. This example uses vector to calculate the angle between sphere position and unit vector along X-Axis. Then it applies this angle for the cube’s rotation.

dot node