lovr.graphics.transform

Apply a transform to the coordinate system, changing its translation, rotation, and scale using a single function. A mat4 can also be used.

The transformation will last until lovr.draw returns or the transformation is popped off the transformation stack.

lovr.graphics.transform(x, y, z, sx, sy, sz, angle, ax, ay, az)

Arguments

NameTypeDefaultDescription
xnumber0The x component of the translation.
ynumber0The y component of the translation.
znumber0The z component of the translation.
sxnumber1The x scale factor.
synumber1The y scale factor.
sznumber1The z scale factor.
anglenumber0The number of radians to rotate around the rotation axis.
axnumber0The x component of the axis of rotation.
aynumber1The y component of the axis of rotation.
aznumber0The z component of the axis of rotation.

Returns

Nothing


Modify the coordinate system using a mat4 object.

lovr.graphics.transform(transform)

Arguments

NameTypeDescription
transformmat4The mat4 to apply to the coordinate system.

Returns

Nothing

See also