Skip to content

Commit

Permalink
add hint to show bone
Browse files Browse the repository at this point in the history
  • Loading branch information
ampersand38 committed Oct 10, 2023
1 parent 06f0b2f commit 30f62b1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 8 additions & 1 deletion addons/attached_objects/functions/fnc_attachBone.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,14 @@
} else {
[_x, _entity, _selection, _isRelative] call FUNC(attachToSelection);
};
} forEach _objects;
} forEach _objects params ["_selectionPos", "_selectionY", "_selectionZ"];

private _hintPos = _entity modelToWorldVisual _selectionPos;
[[
["ICON", [_hintPos, "\a3\ui_f\data\IGUI\Cfg\Targeting\LaserTarget_ca.paa"]],
["LINE", [_hintPos, _entity vectorModelToWorldVisual _selectionY vectorMultiply 2 vectorAdd _hintPos, [0, 1, 0, 1]]],
["LINE", [_hintPos, _entity vectorModelToWorldVisual _selectionZ vectorAdd _hintPos, [0, 0, 1, 1]]]
], 3, _entity] call EFUNC(common,drawHint);

[LSTRING(ObjectsAttached), count _objects] call EFUNC(common,showMessage);
}, {}, [_objects, _entity]] call EFUNC(dialog,create);
Expand Down
4 changes: 3 additions & 1 deletion addons/attached_objects/functions/fnc_attachToSelection.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* 3: Relative <BOOLEAN> True to maintain current relative orientation, false to match selection orientation
*
* Return Value:
* None
* 0: Selection Position and Orientation <ARRAY> For drawing hints
*
* Example:
* [_child] call zen_attached_objects_fnc_attachToSelection
Expand Down Expand Up @@ -43,3 +43,5 @@ if (_isRelative) then {
_child setVectorDirAndUp [_vY, _vZ];
[QEGVAR(common,setVectorDirAndUp), [_child, [_vY, _vZ]], _child] call CBA_fnc_targetEvent;
};

[_selectionPos, _selectionY, _selectionZ]

0 comments on commit 30f62b1

Please sign in to comment.