lovr.physics.newCapsuleShape

Creates a new CapsuleShape. Capsules are cylinders with hemispheres on each end.

capsule = lovr.physics.newCapsuleShape(radius, length)

Arguments

NameTypeDefaultDescription
radiusnumber1The radius of the capsule, in meters.
lengthnumber1The length of the capsule, not including the caps, in meters.

Returns

NameTypeDescription
capsuleCapsuleShapeThe new CapsuleShape.

Notes

A Shape can be attached to a Collider using Collider:addShape.

See also