lovr.graphics.getViewPose

Get the pose of a single view.

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

Arguments

NameTypeDescription
viewnumberThe view index.

Returns

NameTypeDescription
xnumberThe x position of the viewer, in meters.
ynumberThe y position of the viewer, in meters.
znumberThe z position of the viewer, in meters.
anglenumberThe number of radians the viewer is rotated around its axis of rotation.
axnumberThe x component of the axis of rotation.
aynumberThe y component of the axis of rotation.
aznumberThe z component of the axis of rotation.

matrix = lovr.graphics.getViewPose(view, matrix, invert)

Arguments

NameTypeDescription
viewnumberThe view index.
matrixMat4The matrix to fill with the view pose.
invertbooleanWhether the matrix should be inverted.

Returns

NameTypeDescription
matrixMat4The original matrix.

See also