Description
Find the nearest road segment to certain position, within given radius.
Syntax
[centre, radius, blacklist] call BIS_fnc_nearestRoad
Parameters:
centre: Positionradius: Number - (Optional, default 50) search radius from centreblacklist: Array - (Optional, default[]) blacklisted road objects
Returns: Object - nearest road object, objNull if not found
Examples
Example 1
private _nearestRoad = [getPosATL player, 500] call BIS_fnc_nearestRoad;
Example 2
private _nearestRoad = [getPosATL vehicle player, 50, getPosATL vehicle player nearRoads 20] call BIS_fnc_nearestRoad;