---
title: contactTestBitMask
framework: spritekit
role: symbol
role_heading: Instance Property
path: spritekit/skphysicsbody/contacttestbitmask
---

# contactTestBitMask

A mask that defines which categories of physics bodies cause intersection notifications with this physics body.

## Declaration

```swift
var contactTestBitMask: UInt32 { get set }
```

## Discussion

Discussion When two bodies share the same space, each body’s category mask is tested against the other body’s contact mask by performing a logical AND operation. If either comparison results in a nonzero value, an SKPhysicsContact object is created and passed to the physics world’s delegate. For best performance, only set bits in the contacts mask for interactions you are interested in. The default value is 0x00000000 (all bits cleared).

## See Also

### Working with Collisions and Contacts

- [About Collisions and Contacts](spritekit/about-collisions-and-contacts.md)
- [categoryBitMask](spritekit/skphysicsbody/categorybitmask.md)
- [collisionBitMask](spritekit/skphysicsbody/collisionbitmask.md)
- [usesPreciseCollisionDetection](spritekit/skphysicsbody/usesprecisecollisiondetection.md)
- [allContactedBodies()](spritekit/skphysicsbody/allcontactedbodies().md)
