# sm.physics.capsuleHasContact

Returns true if any collision object is found inside a given capsule.

**Kind:** Function

**Environments:** Game

## Game

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

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

Faster than capsuleContactCount when only checking for existence.

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 |
| --- | --- |
| boolean | True if any contact was found. |
