Distance Output
data class DistanceOutput(val pointA: Vec2, val pointB: Vec2, val normal: Vec2, val distance: Float, val iterations: Int)
Output of computing the distance between two shapes.
Parameters
point A
Closest point on shape A
point B
Closest point on shape B
normal
Normal vector that points from A to B (invalid if distance is zero)
distance
The final distance (zero if overlapped)
iterations
Number of GJK iterations used