lovr.headset.getDirection
EditReturns the direction a device or model is pointing. It will always be normalized.
Arguments
| Name | Type | Default | Description |
| device | Device | 'head' | The device to get the direction of. |
Returns
| Name | Type | Description |
| x | number | The x component of the direction. |
| y | number | The y component of the direction. |
| z | number | The z component of the direction. |
Arguments
| Name | Type | Description |
| model | Model | The model to get the direction of. |
Returns
| Name | Type | Description |
| x | number | The x component of the direction. |
| y | number | The y component of the direction. |
| z | number | The z component of the direction. |
Notes
If the object isn't tracked, this function returns zeroes.
This is the same as quaternion(lovr.headset.getOrientation(device)):direction().