self:set_collision_layer

Client

Sets the collision layer bitmask of the animatable 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 animatable body
local entity = physics.animatable.create()

entity:set_collision_layer(1)

On this page