# Capsule.GetEdgeDistance

```csharp
float GetEdgeDistance(Vector3 localPos)
```

Calculates the distance from a given point to the edge of the capsule.

### Parameters

- `localPos` (`Vector3`): Position in the same coordinate space as the capsule

### Returns

`float`

Declared in [Capsule](/api/Capsule).
Assembly: `Sandbox.System`.
