Documentation

Unity Engine


User Manual

Script Reference

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 8 days ago

Definition

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