World:setLinearDamping
EditSets the linear damping of the World. Linear damping is similar to drag or air resistance, slowing down colliders over time as they move. Damping is only applied when linear velocity is over the threshold value.
World: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 colliders won't slow down over time. This is the default.
This sets the default damping for newly-created colliders. Damping can also be set on a per-collider basis using Collider:setLinearDamping
.