self:add_collision_exception_with

Client

Adds another physics body to this rigid 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 rigid body
local a = physics.rigid.create()
local b = physics.rigid.create()

a:add_collision_exception_with(b)

On this page