self:set_collision_mask_value

Client

Sets a specific bit on the static body's collision mask


Syntax

local status = self:set_collision_mask_value(
    layer_number,
    value
)

Parameters

TypeNameDescription
intlayer_numberMask 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 mask bit on a static body
local entity = physics.static.create()

entity:set_collision_mask_value(2, true)

On this page