Documentation

Unity Engine

Unity Engine

distance

The distance between the closest points. This is calculated from PhysicsQuery.SegmentDistanceResult.sqrDistance on each access, so prefer that when a squared distance will do.
Read time 1 minuteLast updated 18 days ago

Definition

  • Type: Property
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule
public float distance { get; }