Instance Method

allContactedBodies

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

Declaration

- (NSArray<SKPhysicsBody *> *)allContactedBodies;

Return Value

An array of SKPhysicsBody objects that this body is in contact with.

See Also

Working with Collisions and Contacts

About Collisions and Contacts

Learn how to set up nodes for collision detection.

categoryBitMask

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

collisionBitMask

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

usesPreciseCollisionDetection

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

contactTestBitMask

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