<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "SpriteKit",
  "identifier" : "/documentation/SpriteKit/SKPhysicsWorld/enumerateBodies(at:using:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SpriteKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SKPhysicsWorld(im)enumerateBodiesAtPoint:usingBlock:"
  },
  "title" : "enumerateBodies(at:using:)"
}
-->

# enumerateBodies(at:using:)

Enumerates all the physics bodies in the scene that contain a point.

```
func enumerateBodies(at point: CGPoint, using block: @escaping (SKPhysicsBody, UnsafeMutablePointer<ObjCBool>) -> Void)
```

## Parameters

`point`

A point in scene coordinates.

`block`

A block to be called for each physics body that contains the point. The block takes the following parameters:

- body:
  The physics body that the ray intersected.
- stop:
  A pointer to a Boolean variable. Your block can set this to <doc://com.apple.documentation/documentation/Swift/true> to terminate the enumeration.

## Discussion

---

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)