Collider:setAutomaticMass

Edit

Enables or disables automatic mass for the Collider.

When enabled, the Collider's mass, inertia, and center of mass will be recomputed when:

Additionally, changing the center of mass of a Collider will automatically update its inertia when automatic mass is enabled.

Disable this to manage the mass properties manually. When automatic mass is disabled, Collider:resetMassData can still be used to reset the mass from attached shapes if needed.

Collider:setAutomaticMass(enable)

Arguments

NameTypeDescription
enableboolean Whether automatic mass should be enabled.

Returns

Nothing

See also