Data / Vectors
data/vector_between
Vector Between
Computes the vector from one location to another, along with distance.
Note: Use the normalized output to launch a projectile or entity in a direction.
Inputs
| Name | Type | Optional | Description |
|---|---|---|---|
from |
location | Origin location. | |
to |
location | Target location. |
Outputs
| Name | Type | Description |
|---|---|---|
vector |
vector | Direction vector (to - from). |
normalized |
vector | Unit direction vector. |
distance |
number | Euclidean distance. |
distanceSquared |
number | Squared distance (cheaper to compute). |