# sm.physics.capsuleContactCount

Returns the number of collision objects that are found inside a given capsule.

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
sm.physics.capsuleContactCount( from, to, radius, mask? )
```

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

The capsule is formed by connecting two spheres.

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `from` | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | The world position of the first sphere. |
| `to` | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | The world position of the second sphere. |
| `radius` | number | The radius of the spheres. |
| `mask` *(optional)* | integer | The collision mask. Defaults to [sm.physics.filter.default](../Game-Script-Environment/Static-Functions/sm.physics.md#filter) (Optional) |

**Returns:**

| Type | Description |
| --- | --- |
| integer | The number of objects. |
