IsFilteringTrigger(Collider2D)
Checks if the collider is a trigger and should be filtered by the _useTriggers to be filtered.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.Physics2DModule
public bool IsFilteringTrigger(Collider2D collider)
Parameters
The Collider2D used to check for a trigger.
Returns
Type | Description |
|---|---|
| bool | Returns true when |
Remarks
Filtering is defined as including or excluding objects based upon a specific condition. Trigger filtering checks the _isTrigger and includes it if triggers are being used and excludes it otherwise. IsFilteringTriggers returns true when _useTriggers is set to false and _isTrigger is true. This indicates the is filtered which means it should be excluded. IsFilteringTriggers returns false if otherwise.
colliderAdditional Resources: _useTriggers