Physics.IgnoreCollision(Collider collider1, Collider collider2, boolean ignore = true)
Makes the collision detection system ignore all collisions between collider1 and collider2.
Parameters:
Name | Type | Description |
---|---|---|
collider1 | Collider | Any collider. |
collider2 | Collider | Another collider you want to have collider1 to start or stop ignoring collisions with. |
ignore | boolean | Whether 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.