Rigid Body

self:is_able_to_sleep

Shared

Checks whether the rigid body is allowed to sleep when at rest

Syntax

local result = self:is_able_to_sleep()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
boolresulttrue if the condition is met, false otherwise

Examples

Check if a rigid body can sleep
local entity = physics.rigid.create()

core.engine.print("info", "Rigid body able to sleep:", entity:is_able_to_sleep())

On this page