Vector3 node
Use the Vector3 node to access preset 3D vector variables and common methods.
Read time 2 minutesLast updated 20 days ago
The Vector3 node is a 3D vector toolbox for positions and directions (X, Y, Z). Typical uses:
- Access common directions like forward, up, right, or zero/one vectors.
- Get direction from one point to another and normalize it.
Variables
Expand the Vector3 node to access the following preset variables:Variable | Type | Description |
|---|---|---|
| back | | A vector pointing in the backward direction (0, 0, -1). |
| down | | A vector pointing in the downward direction (0, -1, 0). |
| forward | | A vector pointing in the forward direction (0, 0, 1). |
| left | | A vector pointing in the left direction (-1, 0, 0). |
| one | | A vector with all components set to 1 (1, 1, 1). |
| right | | A vector pointing in the right direction (1, 0, 0). |
| up | | A vector pointing in the upward direction (0, 1, 0). |
| zero | | A vector with all components set to 0 (0, 0, 0). |
Methods
Expand the Vector3 node to access the following methods:Method | Return type | Description |
|---|---|---|
| Angle | | The angle in degrees between two vectors, measured from the first vector to the second vector. The result is always between 0 and 180 degrees. |
| Cross | | The cross product of two vectors, which is a vector that's perpendicular to both input vectors. |
| Distance | | The distance between two points in 3D space, calculated as the magnitude of the difference between two vectors. |
| Dot | | The dot product of two vectors, which is a measure of how much one vector goes in the direction of another. Use to determine the angle between two vectors or to project one vector onto another. |
| Lerp | | A linear interpolation between two vectors based on a given interpolation factor (t). When t is 0, the result is the first vector. When t is 1, the result is the second vector. When t is between 0 and 1, the result is a blend of the two vectors. |
| Max | | A vector that contains the maximum value of each component from two vectors. |
| Min | | A vector that contains the minimum value of each component from two vectors. |
| Scale | | Use to scale one vector by another, for example, to apply a non-uniform scale to a position or direction. |
| Normalize | | A vector with a magnitude of 1, which points in the same direction as the original vector. This is useful for direction vectors where you only care about the direction and not the magnitude. |