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
Name | Data type | Description |
A | Vec4 | The first vector |
B | Vec4 | The second vector |
Output
Name | Data type | Description |
Result | Float | The result of the dot product |
Example

In this example, the cube’s rotation is controlled by the position of the sphere. We use vector to calculate the angle between sphere position and unit vector along X-Axis. Then we apply this angle for the cube’s rotation.
