Skip to content

Commit

Permalink
Vector - Apply magnetic offset setting (#10708)
Browse files Browse the repository at this point in the history
  • Loading branch information
PabstMirror authored Feb 3, 2025
1 parent eb95025 commit 5449e61
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions addons/vector/functions/fnc_getDirection.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ private _position = ATLToASL positionCameraToWorld [0,0,0];
private _direction = ATLToASL positionCameraToWorld [0,0,1];

private _azimuth = ((_direction select 0) - (_position select 0)) atan2 ((_direction select 1) - (_position select 1));
_azimuth = _azimuth call EFUNC(common,getMagneticBearing);
private _inclination = asin ((_direction select 2) - (_position select 2));

if (_azimuth < 0) then {_azimuth = _azimuth + 360};
Expand Down

0 comments on commit 5449e61

Please sign in to comment.