# sm.debugDraw.addSphere

Adds a named sphere debug draw.

**Kind:** Function

**Environments:** Game, Terrain

## Game

``` { .lua .api-signature }
sm.debugDraw.addSphere( name, center, radius?, color? )
```

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

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `name` | string | The debug sphere name. |
| `center` | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | The sphere center. |
| `radius` *(optional)* | number | The sphere radius. Defaults to 0.125. |
| `color` *(optional)* | [Color](../Game-Script-Environment/Userdata/Color.md) | The color. Defaults to white. |

## Terrain

``` { .lua .api-signature }
sm.debugDraw.addSphere( name, center, radius?, color? )
```

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

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `name` | string | The debug sphere name. |
| `center` | [Vec3](../Terrain-Script-Environment/Userdata/Vec3.md) | The sphere center. |
| `radius` *(optional)* | number | The sphere radius. Defaults to 0.125. |
| `color` *(optional)* | [Color](../Terrain-Script-Environment/Userdata/Color.md) | The color. Defaults to white. |
