lovr.headset.getOrientation

Returns the current orientation of a device, in angle/axis form.

angle, ax, ay, az = lovr.headset.getOrientation(device)

Arguments

NameTypeDefaultDescription
deviceDeviceheadThe device to get the orientation of.

Returns

NameTypeDescription
anglenumberThe amount of rotation around the axis of rotation, in radians.
axnumberThe x component of the axis of rotation.
aynumberThe y component of the axis of rotation.
aznumberThe z component of the axis of rotation.

Notes

If the device isn't tracked, all zeroes will be returned.

See also