A mask that defines which categories this physics body belongs to.
SDKs
- iOS 8.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 3.0+
Framework
- Scene
Kit
Declaration
var categoryBitMask: Int { get set }
Discussion
Every physics body in a scene can be assigned to one or more categories, each corresponding to a bit in the bit mask. You define the mask values used in your game. Use this property together with the physics
and contact
properties to define which physics bodies interact with each other and when your game is notified of interactions.
The default value is static
for static bodies and default
for dynamic and kinematic bodies.