Skip to main content

Physics.IgnoreCollision(Collider collider1, Collider collider2, boolean ignore = true)

Makes the collision detection system ignore all collisions between collider1 and collider2.

Parameters:

NameTypeDescription
collider1ColliderAny collider.
collider2ColliderAnother collider you want to have collider1 to start or stop ignoring collisions with.
ignorebooleanWhether or not the collisions between the two colliders should be ignored or not.

Usage

---@type Collider
local collider1;

---@type Collider
local collider2;

---@type boolean
local ignore;


Physics:IgnoreCollision(collider1, collider2, ignore)

Extra Detail

This is useful, say, for preventing projectiles from colliding with the object that fires them.