ACE3/addons/interaction/functions/fnc_getWeaponPos.sqf

25 lines
616 B
Plaintext
Raw Normal View History

/*
* Author: esteldunedain
* Return a suitable position for the action point for the current weapon
*
* Arguments:
2015-05-14 18:00:56 +00:00
* None (uses local variable _target)
*
* Return value:
* Children actions <ARRAY>
*
* Example:
2015-05-14 18:00:56 +00:00
* call ace_interaction_fnc_getWeaponPos
*
* Public: No
*/
#include "script_component.hpp"
// IGNORE_PRIVATE_WARNING(_target);
2015-05-09 20:14:00 +00:00
private ["_weaponDir", "_refSystem"];
_weaponDir = _target weaponDirection currentWeapon _target;
_refSystem = _weaponDir call EFUNC(common,createOrthonormalReference);
(_target selectionPosition "righthand") vectorAdd ((_refSystem select 2) vectorMultiply 0.1);