---
title: categoryBitMask
framework: spritekit
role: symbol
role_heading: Instance Property
path: spritekit/skfieldnode/categorybitmask
---

# categoryBitMask

A mask that defines which categories this field belongs to.

## Declaration

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

## Discussion

Discussion Every field in a scene can be assigned to up to 32 different categories, each corresponding to a bit in the bit mask. The mask values are not predetermined by Sprite Kit. You define the mask values that are used in your game. The field node’s categoryBitMask property is compared to a physics body’s fieldBitMask property using a logical AND operation. If the result is nonzero, the field is applied to the physics body. The default value is 0xFFFFFFFF (all bits set).

## See Also

### Determining Which Physics Bodies Are Affected by the Field

- [isEnabled](spritekit/skfieldnode/isenabled.md)
- [isExclusive](spritekit/skfieldnode/isexclusive.md)
- [region](spritekit/skfieldnode/region.md)
- [minimumRadius](spritekit/skfieldnode/minimumradius.md)
