lovr.headset.getViewAngles

Edit

Returns the view angles of one of the headset views.

These can be used with Mat4:fov to create a projection matrix.

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

left, right, top, bottom = lovr.headset.getViewAngles(view)

Arguments

NameTypeDescription
viewnumber The view index.

Returns

NameTypeDescription
leftnumber The left view angle, in radians.
rightnumber The right view angle, in radians.
topnumber The top view angle, in radians.
bottomnumber The bottom view angle, in radians.

See also