quaternion.direction
EditReturns the direction of a quaternion. It can also be thought of as rotating the forward vector by this quaternion.
direction = quaternion.direction(q)Arguments
| Name | Type | Description |
| q | quaternion | The quaternion to get the direction of. |
Returns
| Name | Type | Description |
| direction | vector | The direction this quaternion "faces". It will be normalized. |
Example
local dir = quaternion(collider:getOrientation()):direction()