Pass:setViewPose

Edit

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.




Set the pose of the view using numbers.

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

Set the pose of the view using vectors.

Arguments

NameTypeDescription
viewnumber The index of the view to update.
positionVec3 The position of the viewer, in meters.
orientationQuat The orientation of the viewer.

Returns

Nothing

Set the pose of the view using a matrix.

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