self:set_disabled

Client

Sets whether the collision shape is disabled, temporarily excluding it from collision detection


Syntax

local status = self:set_disabled(
    state
)

Parameters

TypeNameDescription
boolstatetrue to disable the shape, false to enable it

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Disable a collision shape
local body = physics.rigid.create()
local entity = physics.collision_shape.create(body)

entity:set_disabled(true)

On this page