mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Create an interaction point for the current weapon
This commit is contained in:
parent
8b761e3528
commit
a824c1266a
@ -31,7 +31,14 @@ if((count _this) > 4) then {
|
||||
if(typeName (_actionData select 2) == "ARRAY") then {
|
||||
_pos = _object modelToWorld (_actionData select 2);
|
||||
} else {
|
||||
_pos = _object modelToWorld (_object selectionPosition (_actionData select 2));
|
||||
if ((_actionData select 2) == "weapon") then {
|
||||
// Craft a suitable position for weapon interaction
|
||||
_weaponDir = _object weaponDirection currentWeapon _object;
|
||||
_ref = _weaponDir call EFUNC(common,createOrthonormalReference);
|
||||
_pos = (_object modelToWorld (_object selectionPosition "righthand")) vectorAdd ((_ref select 2) vectorMultiply 0.1);
|
||||
} else {
|
||||
_pos = _object modelToWorld (_object selectionPosition (_actionData select 2));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user