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

# body(in:)

Searches for the first physics body that intersects the specified rectangle.

```
func body(in rect: CGRect) -> SKPhysicsBody?
```

## Parameters

`rect`

A rectangle in scene coordinates.

## Return Value

The first physics body discovered that intersects the rectangle. If no body intersects the rectangle, this method returns `nil`.

## 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)