self:set_sleeping

Client

Sets whether the vehicle 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 vehicle body to sleep
local entity = physics.vehicle.create()

entity:set_sleeping(false)

On this page