A mask that defines which categories of physics bodies can collide with this physics body.
- iOS 8.0+
- macOS 10.10+
- tvOS 9.0+
- watchOS 3.0+
When two physics bodies contact each other, a collision may occur. SceneKit compares the body’s collision mask to the other body’s category mask by performing a bitwise AND operation. If the result is a nonzero value, then the body is affected by the collision. Each body independently chooses whether it wants to be affected by the other body. For example, you might choose to avoid collision calculations that would make negligible changes to a body’s velocity.
The default value is
all (a bit mask whose every bit is enabled), specifying that the body will collide with bodies of all other categories.