Contact:getRestitution

Edit

Returns the restitution of the Contact. Restitution makes the Colliders bounce off of each other. A restitution value of zero results in an inelastic collision response, whereas 1.0 results in an elastic collision that preserves all of the velocity. Restitution can be bigger than 1.0 to make the collision even more bouncy.

restitution = Contact:getRestitution()

Arguments

None

Returns

NameTypeDescription
restitutionnumber The contact restitution.

Notes

The default restitution is the maximum restitution of either of the colliders.

See also