Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise lower carry object #5234

Merged
merged 8 commits into from
Jun 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ nomisum <nomisum@gmail.com>
OnkelDisMaster <onkeldismaster@gmail.com>
oscarmolinadev
PaxJaromeMalues <seemax1991@gmail.com>
Phyma <sethramstrom@gmail.com>
pokertour
Professor <lukas.trneny@wo.cz>
rakowozz
Expand Down
8 changes: 6 additions & 2 deletions addons/dragging/functions/fnc_handleScrollWheel.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down