Collider:removeShape

Edit

Removes a Shape from the Collider.

Collider:removeShape(shape)

Arguments

NameTypeDescription
shapeShape The Shape to remove.

Returns

Nothing

Notes

By default, LÖVR will recompute mass properties for the Collider as shapes are added and removed. Use Collider:setAutomaticMass to enable or disable this behavior.

It is valid for a Collider to have zero shapes, but due to a limitation of the physics engine LÖVR substitutes in a 1mm sphere so that the Collider still has mass. It isn't advisable to keep these tiny spheres around. Instead, prefer to quickly attach other shapes, or disable the Collider with Collider:setEnabled.

See also