Instance Property


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


@property(nonatomic, assign) uint32_t contactTestBitMask;


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

Learn how to set up nodes for collision detection.


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


A mask that defines which categories of physics bodies can collide with this physics body.


A Boolean value that determines whether the physics world uses an iterative collision detection algorithm.

- allContactedBodies

The physics bodies that this physics body is in contact with.