# autoDistance

> When set, _distance is recomputed at create from the world separation of the two anchors.

## Definition

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

```csharp
public bool autoDistance { readonly get; set; }
```

### Remarks

It is measured after any [\_autoAnchorA](/engine/6000.7/script-reference/unity/u2d/physics/physicsdistancejointdefinition/autoanchora.md)/[\_autoAnchorB](/engine/6000.7/script-reference/unity/u2d/physics/physicsdistancejointdefinition/autoanchorb.md) resolution, so it reflects the anchors actually used. It is applied at create only; the authored [\_distance](/engine/6000.7/script-reference/unity/u2d/physics/physicsdistancejointdefinition/distance.md) is ignored while this is set.
