Parameter | Description |
---|---|
collider | The Collider to retrieve contacts for. |
contactFilter | The contact filter used to filter the results differently, such as by layer mask, Z depth, or normal angle. |
allocator | The memory allocator to use for the results. This can only be Allocator.Temp, Allocator.TempJob or Allocator.Persistent. |
ColliderArray2D A collection of Collider2D containing the results. The collection does not allocate any managed memory but must be disposed of.
Retrieves all colliders in contact with this Collider, with the results filtered by the contactFilter
.
Parameter | Description |
---|---|
rigidbody | The Rigidbody to retrieve contacts for. All Colliders attached to this Rigidbody will be checked. |
contactFilter | The contact filter used to filter the results differently, such as by layer mask, Z depth, or normal angle. |
allocator | The memory allocator to use for the results. This can only be Allocator.Temp, Allocator.TempJob or Allocator.Persistent. |
ColliderArray2D A collection of Collider2D containing the results. The collection does not allocate any managed memory but must be disposed of.
Retrieves all colliders in contact with this Rigidbody, with the results filtered by the contactFilter
.