Collider:setFriction

Edit

Sets the friction of the Collider. Friction determines how easy it is for two colliders to slide against each other. Low friction makes it easier for a collider to slide, simulating a smooth surface.

Collider:setFriction(friction)

Arguments

NameTypeDescription
frictionnumber The friction of the Collider.

Returns

Nothing

Notes

The default friction is .2.

When two colliders collide, their friction is combined using the geometric mean:

friction = (frictionA * frictionB) ^ .5

See also