Mat4

A mat4 is a math type that holds 16 values in a 4x4 grid.

Constructors

lovr.math.newMat4Create a new Mat4.
lovr.math.mat4Create a temporary Mat4.

Methods

Mat4:fovSet a projection using raw FoV angles.
Mat4:identityReset the matrix to the identity.
Mat4:invertInvert the matrix.
Mat4:lookAtCreate a transform that makes a viewer look at a target.
Mat4:mulMultiply a matrix with another matrix or a vector.
Mat4:orthographicTurn the matrix into an orthographic projection.
Mat4:perspectiveTurn the matrix into a perspective projection.
Mat4:rotateRotate the matrix.
Mat4:scaleScale the matrix.
Mat4:setSet the components of the matrix.
Mat4:translateTranslate the matrix.
Mat4:transposeTranspose the matrix.
Mat4:unpackGet the individual components of the matrix.

See also