self:set_collision_mask_value

Client

Sets a specific bit on the vehicle 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 vehicle body
local entity = physics.vehicle.create()

entity:set_collision_mask_value(2, true)

On this page