Body:set_damping
Sets the linear damping of the underlying love.Body.
Usage
body:set_damping(damping)
Arguments
| Name | Type | Description |
|---|---|---|
damping | number | Linear damping amount. |
Examples
local ecs = crystal.ECS:new();
ecs:add_system(crystal.PhysicsSystem);
local entity = ecs:spawn(crystal.Entity);
entity:add_component(crystal.Body);
entity:set_damping(0.1);
print(entity:damping()); -- Prints "0.1"