Collider:set_friction
Sets the friction coefficient of this collider.
Usage
collider:set_friction(friction)
Arguments
| Name | Type | Description |
|---|---|---|
friction | number | Friction 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_friction(0.1);