A mask that defines which categories of bodies cause intersection notifications with this physics body.
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
When two physics bodies overlap, a contact may occur. SceneKit compares the body’s contact mask to the other body’s category mask by performing a bitwise AND operation. If the result is a nonzero value, SceneKit creates an
SCNPhysics object describing the contact and sends messages to the
contact object of the scene’s physics world. For best performance, only set bits in the contact mask for interactions you are interested in.
For applications running in OS X v10.10 or iOS 8, this property’s value matches that of the
collision property—that is, SceneKit sends contact messages if and only if a collision occurs. For applications running in OS X v10.11 or iOS 9 or later, this property’s value defaults to zero and need not match the collision mask—that is, a pair of bodies generates contact messages whenever the bodies intersect, regardless of whether they collide or pass through one another.