Documentation

Unity Engine

Download Unity

Unity Engine

sqrDistance

The squared distance between the closest points. Use this in place of PhysicsQuery.SegmentDistanceResult.distance when comparing against another squared distance, as it avoids a square root.
Read time 1 minuteLast updated a month ago

Definition

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