Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


PhysicsQuery.DistanceResult

Distance result from shape distance queries.
Read time 1 minuteLast updated 12 days ago

Definition

  • Type: Struct
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule
public readonly struct PhysicsQuery.DistanceResult

Properties

Property

Description

distanceThe distance between the points, zero if overlapped.
iterationsThe number of iterations used in the calculation.
normalA Normal vector that points from A to B. This is invalid if the distance is zero.
pointAClosest point on shape A.
pointBClosest point on shape B.

Structs

Struct

Description

PhysicsQuery.DistanceResult.SortAscendingOrderAscending distance sort comparer.