<!--
{
  "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/SCNPhysicsWorld/TestOption/collisionBitMask",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:@SCNPhysicsTestCollisionBitMaskKey"
  },
  "title" : "collisionBitMask"
}
-->

# collisionBitMask

The key for selecting which categories of physics bodies that SceneKit should test for contacts.

```
static let collisionBitMask: SCNPhysicsWorld.TestOption
```

## Discussion

The value for this key is an <doc://com.apple.documentation/documentation/Foundation/NSNumber> object containing an <doc://com.apple.documentation/documentation/ObjectiveC/NSUInteger> value. SceneKit tests for contacts only with physics bodies whose [`categoryBitMask`](/documentation/SceneKit/SCNPhysicsBody/categoryBitMask) property overlaps with this bit mask. The default value is [`all`](/documentation/SceneKit/SCNPhysicsCollisionCategory/all), specifying that searches should test all physics bodies regardless of their category.

---

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)