<!--
{
  "availability" : [
    "iOS: 8.0.0 - 26.0.0",
    "iPadOS: 8.0.0 - 26.0.0",
    "macCatalyst: 13.1.0 - 26.0.0",
    "macOS: 10.8.0 - 26.0.0",
    "tvOS: 9.0.0 - 26.0.0",
    "visionOS: 1.0.0 - 26.0.0",
    "watchOS: 3.0.0 - 26.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SceneKit",
  "identifier" : "/documentation/SceneKit/SCNPhysicsBody/categoryBitMask",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCNPhysicsBody(py)categoryBitMask"
  },
  "title" : "categoryBitMask"
}
-->

# categoryBitMask

A mask that defines which categories this physics body belongs to.

```
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 [`physicsShape`](/documentation/SceneKit/SCNPhysicsBody/physicsShape) and [`contactTestBitMask`](/documentation/SceneKit/SCNPhysicsBody/contactTestBitMask) properties to define which physics bodies interact with each other and when your game is notified of interactions.

The default value is [`static`](/documentation/SceneKit/SCNPhysicsCollisionCategory/static) for static bodies and [`default`](/documentation/SceneKit/SCNPhysicsCollisionCategory/default) for dynamic and kinematic bodies.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)