A mask that defines which categories this physics field belongs to.
- iOS 8.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
To determine whether a field affects a physics body, SceneKit performs a bitwise AND operation on the field’s category bit mask and the body’s
category property. If the result is a nonzero value, SceneKit computes and applies the force of the field on the body. To determine whether a field affects the particles spawned by an
SCNParticle object, SceneKit performs the same check using the
category property of the node containing the particle system.
Use this property to create fields which affect only certain bodies in your scene. Reducing the number of bodies affected by fields can also improve simulation performance.