Calculates the closest point on a line segment to a given point in 2D (XZ plane)
Output parameter for the closest point
The point
First endpoint of the segment
Second endpoint of the segment
Calculates the closest point on a line segment to a given point in 2D (XZ plane)