Version: Unity 6.6 Alpha (6000.6)
LanguageEnglish
  • C#

ContactFilterGroupMode

enumeration

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

The mode used to determine how PhysicsShape.ContactFilter.groupIndex is used.

Properties

Property Description
Group In this mode, the PhysicsShape.ContactFilter.groupIndex is used to control if contacts are never created (negative) or always created (positive). A non-zero group always overrides the PhysicsShape.ContactFilter.categories and PhysicsShape.ContactFilter.contacts masks. A group of zero has no effect. The rules for two shapes coming into contact are: If either shape has a group of zero then the group is ignored and the PhysicsShape.ContactFilter.categories and PhysicsShape.ContactFilter.contacts masks are used.If both shapes have a non-zero but different group then the PhysicsShape.ContactFilter.categories and PhysicsShape.ContactFilter.contacts masks are used.If both shapes have an identical and positive group then they will always produce a contact.If both shapes have an identical and negative group then they will never produce a contact.
Filtering In this mode, the PhysicsShape.ContactFilter.groupIndex is used to filter if contacts are allowed to be created by the PhysicsShape.ContactFilter.categories and PhysicsShape.ContactFilter.contacts masks. The rules for two shapes coming into contact are: If both shapes have an identical group then the PhysicsShape.ContactFilter.categories and PhysicsShape.ContactFilter.contacts masks are used.If both shapes have a different group then they will never produce a contact irrelevant of the PhysicsShape.ContactFilter.categories and PhysicsShape.ContactFilter.contacts mask configuration.A group of zero is used like any other group but is also the default therefore if unchanged, the PhysicsShape.ContactFilter.categories and PhysicsShape.ContactFilter.contacts masks are used by default.