self:set_sleeping

Client

Sets whether the rigid body is sleeping


Syntax

local status = self:set_sleeping(
    state
)

Parameters

TypeNameDescription
boolstatetrue to put the body to sleep, false to wake it

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Put a rigid body to sleep
local entity = physics.rigid.create()

entity:set_sleeping(true)

On this page