arjay 7 Posted May 6, 2013 I was wondering if anyone could help me with getting the direction of a road segment. The following code only returns 0 for the direction of any roads I try it with? Do road segments even have a direction or are they not considered as normal objects like buildings? _nearRoads = _parkingPosition nearRoads 10; if(count _nearRoads > 0) then { _road = _nearRoads select 0; _direction = getDir _road; }; ---------- Post added at 13:51 ---------- Previous post was at 13:44 ---------- Answered my own question :) Might be helpful to others... _nearRoads = _parkingPosition nearRoads 10; if(count _nearRoads > 0) then { _road = _nearRoads select 0; _roadConnectedTo = roadsConnectedTo _road; _connectedRoad = _roadConnectedTo select 0; _direction = [_road, _connectedRoad] call BIS_fnc_DirTo; }; 1 Share this post Link to post Share on other sites
Kushluk 21 Posted May 6, 2013 (edited) On a related matter, I have noticed that some stratis road segment directions do not always run flush with the visual road geometry as with Takistan. ie The following code can return some inconsistent results. _vehicle setDir (getDir _segment); Edit: 10,000 Posts for kju! :) Edited May 6, 2013 by Kushluk Share this post Link to post Share on other sites