Arma 3 Scripting

Function in Geometry

BIS_fnc_nearestPoint

Also available as Markdown and JSON, or read the original wiki page.

Description

Computes nearest point in a line.

Syntax

[start, end, point, is2D] call BIS_fnc_nearestPoint

Parameters:

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