self:set_collision_layer

Client

Sets the collision layer bitmask of the area


Syntax

local status = self:set_collision_layer(
    layer
)

Parameters

TypeNameDescription
intlayerCollision layer bitmask to apply

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Set the collision layer of a area
local entity = physics.area.create()

entity:set_collision_layer(1)

On this page