lovr.headset.getDirection
EditReturns the direction a device is pointing. It will always be normalized.
x, y, z = lovr.headset.getDirection(device)
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. |
Notes
If the device isn't tracked, all zeroes will be returned.
This is the same as quat(lovr.headset.getOrientation(device)):direction():unpack()
.