Function VectorMath.ClosestPointOnSegmentXZ

ClosestPointOnSegmentXZ (Vector3 lineStart, Vector3 lineEnd, Vector3 point)

Returns the closest point on the segment in the XZ plane.

Public Static
Vector3 ClosestPointOnSegmentXZ (

Vector3

lineStart

Vector3

lineEnd

Vector3

point

)

Returns the closest point on the segment in the XZ plane.

The y coordinate of the result will be the same as the y coordinate of the point parameter.

The segment is NOT treated as infinite.