self:add_collision_exception_with

Client

Adds another physics body to this static body's collision exception list so the two no longer collide with each other


Syntax

local status = self:add_collision_exception_with(
    body
)

Parameters

TypeNameDescription
objectbodyPhysics body instance to exclude from collision — must be the same physics type as this instance

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Add a collision exception on a static body
local a = physics.static.create()
local b = physics.static.create()

a:add_collision_exception_with(b)

On this page