lovr.physics.newCapsuleShape

Edit

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

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

Arguments

NameTypeDefaultDescription
radiusnumber1 The radius of the capsule, in meters.
lengthnumber1 The length of the capsule, not including the caps, in meters.

Returns

NameTypeDescription
capsuleCapsuleShape The new CapsuleShape.

Notes

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

See also