World:newCapsuleCollider

Adds a new Collider to the World with a CapsuleShape already attached.

collider = World:newCapsuleCollider(x, y, z, radius, length)

Arguments

NameTypeDefaultDescription
xnumber0The x coordinate of the center of the capsule.
ynumber0The y coordinate of the center of the capsule.
znumber0The z coordinate of the center of the capsule.
radiusnumber1The radius of the capsule, in meters.
lengthnumber1The length of the capsule, not including the caps, in meters.

Returns

NameTypeDescription
colliderColliderThe new Collider.

See also