Contact:setFriction

Edit

Sets the friction of the Contact. Lower friction makes it easier for the colliders to slide against each other. This overrides the default friction computed by the friction of the two Colliders.

Contact:setFriction(friction)

Arguments

NameTypeDescription
frictionnumber The contact friction.

Returns

Nothing

Notes

The default friction is computed from the geometric mean of the Colliders' friction:

friction = (frictionA * frictionB) ^ .5

Negative frictions will be clamped to zero.

See also