Collider:getFriction

Edit

Returns 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.

friction = Collider:getFriction()

Arguments

None

Returns

NameTypeDescription
frictionnumber The friction of the Collider.

Notes

The default friction is .2.

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

friction = (frictionA * frictionB) ^ .5

See also