---
title: "body(in:)"
framework: spritekit
role: symbol
role_heading: Instance Method
path: "spritekit/skphysicsworld/body(in:)"
---

# body(in:)

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

## Declaration

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

## Parameters

- `rect`: A rectangle in scene coordinates.

## Mentioned in

Searching the World for Physics Bodies

## Return Value

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

## See Also

### Searching the Scene for Physics Bodies

- [Searching the World for Physics Bodies](spritekit/searching-the-world-for-physics-bodies.md)
- [body(alongRayStart:end:)](spritekit/skphysicsworld/body(alongraystart:end:).md)
- [body(at:)](spritekit/skphysicsworld/body(at:).md)
- [enumerateBodies(alongRayStart:end:using:)](spritekit/skphysicsworld/enumeratebodies(alongraystart:end:using:).md)
- [enumerateBodies(at:using:)](spritekit/skphysicsworld/enumeratebodies(at:using:).md)
- [enumerateBodies(in:using:)](spritekit/skphysicsworld/enumeratebodies(in:using:).md)
