self:is_sleeping

Client

Checks whether the rigid body is currently sleeping (excluded from active physics simulation)


Syntax

local result = self:is_sleeping()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
boolresulttrue if the condition is met, false otherwise

Examples

Check if a rigid body is sleeping
local entity = physics.rigid.create()

core.engine.print("info", "Rigid body sleeping:", entity:is_sleeping())

On this page