Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- arjay_pointAt =
- {
- private ["_source", "_target", "_relDirHor", "_relDirVer"];
- _source = _this select 0;
- _target = _this select 1;
- _relDirHor = [_source, _target] call BIS_fnc_DirTo;
- _source setDir _relDirHor;
- _asin = ((((getPosASL _source) select 2) - ((getPosASL _target) select 2)) / (_target distance _source));
- if(_asin>1) then { _asin=1; };
- if(_asin<-1) then { _asin=-1; };
- _relDirVer = asin _asin
- _relDirVer = (_relDirVer * -1);
- [_source, _relDirVer, 0] call BIS_fnc_setPitchBank;
- };
Advertisement
Add Comment
Please, Sign In to add comment