lovr.headset.getDirection

Edit

Returns the direction a device is pointing. It will always be normalized.

x, y, z = lovr.headset.getDirection(device)

Arguments

NameTypeDefaultDescription
deviceDevice'head' The device to get the direction of.

Returns

NameTypeDescription
xnumber The x component of the direction.
ynumber The y component of the direction.
znumber 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().

See also