when i want the dir from some object a create a new marker that is taken as referance so for example
i spawn a heli on"spawn1" want it to face a specific direction and get the direcktion from "spawn2"
i know taht means manuely placing markers but its a way for gettig direcktion
if you want to see my script
"_spawn1 = getMarkerPos "spawn1";
_spawn2 = getMarkerPos "spawn2";
_dirVector = _spawn2 vectorDiff _spawn1;
_height = (_spawn1 select 2) + 15.4;
_vehicle = createVehicle ["B_Heli_Light_01_dynamicLoadout_F", _spawn1, [], 0, "NONE"];
heli1 = _vehicle;
_vehicle setVectorDirAndUp [_dirVector, [0,0,1]];
_vehicle setPos [_spawn1 select 0, _spawn1 select 1, _height];
execVM "scripts\racketosweggos.sqf";"
i hope this is a help for you.