lovr.headset.getViewPose

Edit

Returns the pose of one of the headset views. This info can be used to create view matrices or do other eye-dependent calculations.

If tracking data is unavailable for the view or the index is invalid, nil is returned.

x, y, z, angle, ax, ay, az = lovr.headset.getViewPose(view)

Arguments

NameTypeDescription
viewnumber The view index.

Returns

NameTypeDescription
xnumber | nil The x coordinate of the view position, in meters.
ynumber | nil The y coordinate of the view position, in meters.
znumber | nil The z coordinate of the view position, in meters.
anglenumber | nil The amount of rotation around the rotation axis, in radians.
axnumber | nil The x component of the axis of rotation.
aynumber | nil The y component of the axis of rotation.
aznumber | nil The z component of the axis of rotation.

See also