self:set_collision_layer_value

Client

Sets a specific bit on the rigid body's collision layer


Syntax

local status = self:set_collision_layer_value(
    layer_number,
    value
)

Parameters

TypeNameDescription
intlayer_numberLayer bit index to set (1-32)
boolvaluetrue to enable the bit, false to disable it

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Set a collision layer bit on a rigid body
local entity = physics.rigid.create()

entity:set_collision_layer_value(2, true)

On this page