Skip to content

Commit

Permalink
Merge pull request #377 from CBATeam/fix_turretDir_ASL
Browse files Browse the repository at this point in the history
use ASL position instead of AGL to get direction vector
  • Loading branch information
Killswitch00 committed Jun 14, 2016
2 parents b5da4cc + 56cd416 commit ed84b4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/common/fnc_turretDir.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ private _gunBeg = _vehicle selectionPosition getText (_turretConfig >> "gunBeg")
private _gunEnd = _vehicle selectionPosition getText (_turretConfig >> "gunEnd");

if !(_relativeToModel) then {
_gunBeg = _vehicle modelToWorld _gunBeg;
_gunEnd = _vehicle modelToWorld _gunEnd;
_gunBeg = AGLToASL (_vehicle modelToWorld _gunBeg);
_gunEnd = AGLToASL (_vehicle modelToWorld _gunEnd);
};

private _turretDir = _gunEnd vectorFromTo _gunBeg;
Expand Down

0 comments on commit ed84b4f

Please sign in to comment.