Pass:setViewPose
EditSets 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
Name | Type | Description |
view | number | The index of the view to update. |
x | number | The x position of the viewer, in meters. |
y | number | The y position of the viewer, in meters. |
z | number | The z position of the viewer, in meters. |
angle | number | The number of radians the viewer is rotated around its axis of rotation. |
ax | number | The x component of the axis of rotation. |
ay | number | The y component of the axis of rotation. |
az | number | The z component of the axis of rotation. |
Returns
Nothing
Set the pose of the view using vectors.
Arguments
Name | Type | Description |
view | number | The index of the view to update. |
position | Vec3 | The position of the viewer, in meters. |
orientation | Quat | The orientation of the viewer. |
Returns
Nothing
Set the pose of the view using a matrix.
Arguments
Name | Type | Description |
view | number | The index of the view to update. |
matrix | Mat4 | A matrix containing the viewer pose. |
inverted | boolean | Whether the matrix is an inverted pose (a view matrix). |
Returns
Nothing