# autoDistance

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

## Definition

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

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

### Remarks

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