# sm.debugDraw.drawBoxTopDown

Draws a box.

**Kind:** Function

**Environments:** Game, Terrain

## Game

``` { .lua .api-signature }
sm.debugDraw.drawBoxTopDown( min, max, position, rotation?, color?, duration? )
```

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

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `min` | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | The minimum extent of the box. |
| `max` | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | The maximum extent of the box. |
| `position` | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | The position of the box. |
| `rotation` *(optional)* | [Quat](../Game-Script-Environment/Userdata/Quat.md) | The rotation of the box. Defaults to identity. |
| `color` *(optional)* | [Color](../Game-Script-Environment/Userdata/Color.md) | The color of the box. Defaults to white. |
| `duration` *(optional)* | number | The duration of the flash animation in seconds. Defaults to 0.5 seconds. |

## Terrain

``` { .lua .api-signature }
sm.debugDraw.drawBoxTopDown( min, max, position, rotation?, color?, duration? )
```

[Open the full Terrain reference](../Terrain-Script-Environment/Static-Functions/sm.debugDraw.md#drawboxtopdown)

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `min` | [Vec3](../Terrain-Script-Environment/Userdata/Vec3.md) | The minimum extent of the box. |
| `max` | [Vec3](../Terrain-Script-Environment/Userdata/Vec3.md) | The maximum extent of the box. |
| `position` | [Vec3](../Terrain-Script-Environment/Userdata/Vec3.md) | The position of the box. |
| `rotation` *(optional)* | [Quat](../Terrain-Script-Environment/Userdata/Quat.md) | The rotation of the box. Defaults to identity. |
| `color` *(optional)* | [Color](../Terrain-Script-Environment/Userdata/Color.md) | The color of the box. Defaults to white. |
| `duration` *(optional)* | number | The duration of the flash animation in seconds. Defaults to 0.5 seconds. |
