Pass:setViewPose

Sets the pose for a single view. Objects rendered in this view will appear as though the camera is positioned using the given pose.

Up to 6 views are supported. When rendering to the headset, views are changed to match the eye positions. These view poses are also available using lovr.headset.getViewPose.


Pass:setViewPose(view, x, y, z, angle, ax, ay, az)

Arguments

NameTypeDescription
viewnumber The index of the view to update.
xnumber The x position of the viewer, in meters.
ynumber The y position of the viewer, in meters.
znumber The z position of the viewer, in meters.
anglenumber The number of radians the viewer is rotated around its axis of rotation.
axnumber The x component of the axis of rotation.
aynumber The y component of the axis of rotation.
aznumber The z component of the axis of rotation.

Returns

Nothing


Pass:setViewPose(view, matrix, inverted)

Arguments

NameTypeDescription
viewnumber The index of the view to update.
matrixMat4 A matrix containing the viewer pose.
invertedboolean Whether the matrix is an inverted pose (a view matrix).

Returns

Nothing

See also