Body:damping

Returns the linear damping of the underlying love.Body.

Usage

body:damping()

Returns

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"

This site uses Just the Docs, a documentation theme for Jekyll.