Black Ops III

PointOnSegmentNearestToPoint

Given a line segment and a point P, this returns the point on the segment that is closest to P.

Example:

nearestPoint = PointOnSegmentNearestToPoint( A, B, P )

Parameters

ParameterSummary
*SegmentAOne endpoint of the line segment
*SegmentBOther endpoint of the line segment
*PThe point

* = mandatory