# PhysicsShape.ContactFilter

> A contact filter is used to control what contacts are created when intersecting other shapes. A contact filter contains a filter with the addition of a group index allowing overrides to the filter.

## Definition

* **Type:** Struct
* **Namespace:** [UnityEngine.LowLevelPhysics2D](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d.md)
* **Assembly:** UnityEngine.Physics2DModule

```csharp
public struct PhysicsShape.ContactFilter
```

## Static Fields

| Value                                                                                                                              | Description                                                          |
| ---------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| [DefaultCategories](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsshape/contactfilter/defaultcategories.md) | The default categories used.                                         |
| [DefaultContacts](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsshape/contactfilter/defaultcontacts.md)     | The default contacts used.                                           |
| [defaultFilter](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsshape/contactfilter/defaultfilter.md)         | Get a default contact filter that contacts everything.               |
| [Everything](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsshape/contactfilter/everything.md)               | Get a contact filter that is all categories and contacts everything. |

## Constructors

| Constructor                                                                                                                                                                                                         | Description              |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
| [ContactFilter(UnityEngine.LowLevelPhysics2D.PhysicsMask,UnityEngine.LowLevelPhysics2D.PhysicsMask,System.Int32)](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsshape/contactfilter/ctor.md) | Create a contact filter. |

## Properties

| Property                                                                                                             | Description                                                                                                                                                                                                     |
| -------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [categories](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsshape/contactfilter/categories.md) | The categories this object is in. Usually you would only set one bit but multiple are allowed.                                                                                                                  |
| [contacts](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsshape/contactfilter/contacts.md)     | The categories this object will produce contacts with.                                                                                                                                                          |
| [groupIndex](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsshape/contactfilter/groupindex.md) | Collision groups allow a certain group of objects to never collide (negative) or always collide (positive). A group index of zero has no effect. A non-zero group always overrides the category/contacts masks. |
