Function PIDMovement.SmallestDistanceWithinWedge

SmallestDistanceWithinWedge (float2 point, float2 dir1, float2 dir2, float shrinkAmount, NativeArray<float2> edges)

Calculates the closest point on any point of an edge that is inside a wedge.

Public Static
float SmallestDistanceWithinWedge (

float2

point

The origin point of the wedge (the pointy end).

float2

dir1

The first direction of the wedge.

float2

dir2

The second direction of the wedge.

float

shrinkAmount

The wedge is shrunk by this amount. In the same units as the input points.

NativeArray<float2>

edges

The edges to check for intersection with.

)

Calculates the closest point on any point of an edge that is inside a wedge.

Return

The distance to the closest point on any edge that is inside the wedge.