Vehicle Body

self:set_collision_layer

Shared

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

entity:set_collision_layer(1)

On this page