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
| Type | Name | Description |
|---|---|---|
bool | state | true to disable the shape, false to enable it |
Returns
| Type | Name | Description |
|---|---|---|
bool | status | true on successful execution, false otherwise |
Examples
local body = physics.rigid.create()
local entity = physics.collision_shape.create(body)
entity:set_disabled(true)