Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


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.
Read time 1 minuteLast updated 13 days ago

Definition

public struct PhysicsShape.ContactFilter

Static Fields

Value

Description

DefaultCategoriesThe default categories used.
DefaultContactsThe default contacts used.
defaultFilterGet a default contact filter that contacts everything.
EverythingGet a contact filter that is all categories and contacts everything.

Constructors

Properties

Property

Description

categoriesThe categories this object is in. Usually you would only set one bit but multiple are allowed.
contactsThe categories this object will produce contacts with.
groupIndexCollision 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.