self:get_collision_mask_value

Client

Checks whether a specific bit is set on the rigid body's collision mask


Syntax

local result = self:get_collision_mask_value(
    layer_number
)

Parameters

TypeNameDescription
intlayer_numberMask bit index to check (1-32)

Returns

TypeNameDescription
boolresulttrue if the mask bit is set, false otherwise

Examples

Check a collision mask bit on a rigid body
local entity = physics.rigid.create()

core.engine.print("info", "Rigid body collision mask value:", entity:get_collision_mask_value(1))

On this page