# distance

> Gets the distance between two colliders.

## Definition

* **Type:** Property
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.Physics2DModule

```csharp
public float distance { get; set; }
```

### Remarks

The distance between two colliders is defined as the length of a [Vector2](/engine/6000.7/script-reference/unityengine/vector2.md) between [\_pointA](/engine/6000.7/script-reference/unityengine/colliderdistance2d/pointa.md) and [\_pointB](/engine/6000.7/script-reference/unityengine/colliderdistance2d/pointb.md).  The [\_distance](/engine/6000.7/script-reference/unityengine/colliderdistance2d/distance.md) between these points can be positive indicating that the [Collider2D](/engine/6000.7/script-reference/unityengine/collider2d.md) are separated (not overlapped), zero indicating that they are touching (but not overlapped) or negative indicating that they are overlapped.
