self:set_sleeping
Client
Sets whether the rigid body is sleeping
Syntax
local status = self:set_sleeping(
state
)Parameters
| Type | Name | Description |
|---|---|---|
bool | state | true to put the body to sleep, false to wake it |
Returns
| Type | Name | Description |
|---|---|---|
bool | status | true on successful execution, false otherwise |
Examples
local entity = physics.rigid.create()
entity:set_sleeping(true)