self:set_collision_mask

Client

Sets the collision mask bitmask of the static body


Syntax

local status = self:set_collision_mask(
    mask
)

Parameters

TypeNameDescription
intmaskCollision mask bitmask to apply

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Set the collision mask of a static body
local entity = physics.static.create()

entity:set_collision_mask(1)

On this page