Angle Between
Use Angle Between to calculate the angle between two vectors. Supported types: Vec2 and Vec3. Angle Between is in the Transform category.
Input
Name | Data Type | Description |
---|---|---|
A | Vec2 | The first vector. |
B | Vec2 | The second vector. |
Output
Name | Data Type | Description |
---|---|---|
Result | Number | The acute angle between the two input vectors in radians. |
Example
This example shows how to use Angle Between to detect if the ray from the camera is hitting the sphere within the 5 degrees. If it is, the sphere will turn red.