self:set_collision_layer

Client

Sets the collision layer bitmask of the character body


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 character body
local entity = physics.character.create()

entity:set_collision_layer(1)

On this page