Description
Computes nearest point in a line.
Syntax
[start, end, point, is2D] call BIS_fnc_nearestPoint
Parameters:
start: Position - line startend: Position - line endpoint: Position - point to check againstis2D: Boolean - (Optional, default false) 2D calculation instead of 3D
Returns: Position - the line point that is closest to point
Examples
Example 1
private _idealLocation = [getMarkerPos "base", getMarkerPos "destination", getPos player, true] call BIS_fnc_nearestPoint;
See also
nearObjects · nearestObject · nearestObjects · BIS_fnc_nearestPosition · BIS_fnc_nearestNum · BIS_fnc_nearestRoad · BIS_fnc_nearestHelipad · BIS_fnc_isPosBlacklisted