lovr.graphics.cylinder

Draws a cylinder.

lovr.graphics.cylinder(x, y, z, length, angle, ax, ay, az, r1, r2, capped, segments)

Arguments

NameTypeDefaultDescription
xnumber0The x coordinate of the cylinder.
ynumber0The y coordinate of the cylinder.
znumber0The z coordinate of the cylinder.
lengthnumber1The length of the cylinder, in meters.
anglenumber0The rotation of the cylinder around its rotation axis, in radians.
axnumber0The x coordinate of the cylinder's axis of rotation.
aynumber1The y coordinate of the cylinder's axis of rotation.
aznumber0The z coordinate of the cylinder's axis of rotation.
r1number1The radius of one end of the cylinder.
r2number1The radius of the other end of the cylinder.
cappedbooleantrueWhether the top and bottom should be rendered.
segmentsnumbernilThe number of radial segments to use for the cylinder. If nil, the segment count is automatically determined from the radii.

Returns

Nothing


lovr.graphics.cylinder(material, x, y, z, length, angle, ax, ay, az, r1, r2, capped, segments)

Arguments

NameTypeDefaultDescription
materialMaterialThe Material to apply to the cylinder.
xnumber0The x coordinate of the cylinder.
ynumber0The y coordinate of the cylinder.
znumber0The z coordinate of the cylinder.
lengthnumber1The length of the cylinder, in meters.
anglenumber0The rotation of the cylinder around its rotation axis, in radians.
axnumber0The x coordinate of the cylinder's axis of rotation.
aynumber1The y coordinate of the cylinder's axis of rotation.
aznumber0The z coordinate of the cylinder's axis of rotation.
r1number1The radius of one end of the cylinder.
r2number1The radius of the other end of the cylinder.
cappedbooleantrueWhether the top and bottom should be rendered.
segmentsnumbernilThe number of radial segments to use for the cylinder. If nil, the segment count is automatically determined from the radii.

Returns

Nothing

See also