# Distance(PhysicsShape, bool)

> Get the minimum distance between all the shapes attached to this body and the specified shape.

## Definition

* **Type:** Method
* **Namespace:** [Unity.U2D.Physics](/engine/6000.7/script-reference/unity/u2d/physics.md)
* **Assembly:** UnityEngine.PhysicsCore2DModule

```csharp
public PhysicsQuery.DistanceResult Distance(PhysicsShape physicsShape, bool useRadii = true)
```

### Parameters

**** (\[PhysicsShape]\(/engine/6000.7/script-reference/unity/u2d/physics/physicsshape)): The shape to check the distance of.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Whether to use the radii of all shapes or not.

### Returns

| Type                                                                                               | Description          |
| -------------------------------------------------------------------------------------------------- | -------------------- |
| [DistanceResult](/engine/6000.7/script-reference/unity/u2d/physics/physicsquery/distanceresult.md) | The distance result. |
