Collider:setLinearDamping
EditSets the Collider's linear damping parameter. Linear damping is similar to drag or air resistance, slowing the Collider down over time. Damping is only applied when linear velocity is over the threshold value.
Collider:setLinearDamping(damping, threshold)
Arguments
Name | Type | Default | Description |
damping | number | The linear damping. | |
threshold | number | 0 | Velocity limit below which the damping is not applied. |
Returns
Nothing
Notes
A linear damping of 0 means the Collider won't slow down over time. This is the default.
Linear damping can also be set on the World using World:setLinearDamping
, which will affect all new colliders.