Documentation

Unity Engine

Unity Engine

PhysicsQuery.DistanceResult

Distance result from shape distance queries.
Read time 1 minuteLast updated 2 months ago

Definition

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.