Collider:set_restitution
Sets the restitution coefficient of this collider.
Usage
collider:set_restitution(restitution)
Arguments
| Name | Type | Description |
|---|---|---|
restitution | number | Restitution coefficient. |
Examples
local ecs = crystal.ECS:new();
ecs:add_system(crystal.PhysicsSystem);
local hero = ecs:spawn(crystal.Entity);
hero:add_component(crystal.Body);
hero:add_component(crystal.Collider, love.physics.newCircleShape(4));
hero:set_restitution(0.1);