diff --git a/AUTHORS.txt b/AUTHORS.txt index 401722e05ca..2ebcec90883 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -103,6 +103,7 @@ nomisum OnkelDisMaster oscarmolinadev PaxJaromeMalues +Phyma pokertour Professor rakowozz diff --git a/addons/dragging/functions/fnc_handleScrollWheel.sqf b/addons/dragging/functions/fnc_handleScrollWheel.sqf index e3a30ea9e04..f82478d5319 100644 --- a/addons/dragging/functions/fnc_handleScrollWheel.sqf +++ b/addons/dragging/functions/fnc_handleScrollWheel.sqf @@ -37,8 +37,12 @@ _position set [2, ((_position select 2) + _scrollAmount min (_maxHeight + 1.5)) // move up/down object and reattach at current position detach _carriedItem; -_carriedItem setPosATL _position; -_carriedItem attachTo [_unit]; + +// Uses this method of selecting position because setPosATL did not have immediate effect +private _positionChange = _position vectorDiff (getPosATL _carriedItem); +private _selectionPosition = _unit worldToModel (ASLtoAGL getPosWorld _carriedItem); +_selectionPosition = _selectionPosition vectorAdd _positionChange; +_carriedItem attachTo [_unit, _selectionPosition]; //reset the carry direction private _direction = _carriedItem getVariable [QGVAR(carryDirection), 0];