# sm.physics.getShapeContactsInBox

Returns a table of all shapes colliding with a given box.

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
sm.physics.getShapeContactsInBox( position, rotation, halfExtents, world )
```

[Open the full Game reference](../Game-Script-Environment/Static-Functions/sm.physics.md#getshapecontactsinbox)

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `position` | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | The center position of the box. |
| `rotation` | [Quat](../Game-Script-Environment/Userdata/Quat.md) | The rotation of the box. |
| `halfExtents` | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | The halved size of the box. |
| `world` | [World](../Game-Script-Environment/Userdata/World.md) | The world to search in. (optional) |

**Returns:**

| Type | Description |
| --- | --- |
| table | The table of found shapes. \{\{shape=[Shape](../Game-Script-Environment/Userdata/Shape.md), contactWorldPosition=[Vec3](../Game-Script-Environment/Userdata/Vec3.md) \}, ..\} |
