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.
See ContactFilterMode.
| Property | Description |
|---|---|
| DefaultCategories | The default categories used. |
| DefaultContacts | The default contacts used. |
| defaultFilter | Get a default contact filter that contacts everything. |
| Everything | Get a contact filter that is all categories and contacts everything. |
| Property | Description |
|---|---|
| categories | The categories this object is in. Usually you would only set one bit but multiple are allowed. |
| contacts | The categories this object will produce contacts with. |
| groupIndex | The group which the contact filter uses to determine if the categories and contact masks are used. See ContactFilterGroupMode for more information. |
| Constructor | Description |
|---|---|
| PhysicsShape.ContactFilter | Create a contact filter. See ContactFilterMode. |
| Method | Description |
|---|---|
| CanContact | Will this contact filter produce a contact with the specified contact filter. The term "contact" here means that if these filters were used on two PhysicsShape, would a contact be produced. |