Function VectorMath.ClosestPointOnSegment

ClosestPointOnSegment (Vector3 lineStart, Vector3 lineEnd, Vector3 point)

Returns the closest point on the segment.

Public Static
Vector3 ClosestPointOnSegment (

Vector3

lineStart

Vector3

lineEnd

Vector3

point

)

Returns the closest point on the segment.

The segment is NOT treated as infinite.