Adding actions to object selections is impossible beyond 15m of the center of the object, selections on the edge of the 15m appear if player is within 15m of object center.
Description
Description
Details
Details
- Severity
- Minor
- Resolution
- Open
- Reproducibility
- Always
- Operating System
- Windows 10 x64
- Category
- Scripting
Steps To Reproduce
- Place an Industrial Shed and Big Dome in the editor or find them.
- Run SQF below in debug console when in-game
- "Door X" will appear as an action for doors that are working, this action disappears past 15m of object center.
if !(isNil "selection_evh") then {removeMissionEventHandler ["Draw3D", selection_evh]}; selection_evh = addMissionEventHandler ["Draw3D", { _cobj = getCursorObjectParams; _obj = getCursorObjectParams select 0; _curSel = _cobj select 1; _sel = (selectionNames _obj) + _curSel; _selDone = []; { if !(_x in _selDone) then { _color = if (_x in (_cobj select 1)) then {[0,1,0,0.75]} else {[1,0,0,0.75]}; drawIcon3D [ "", _color, _obj modelToWorld (_obj selectionPosition [_x,"Geometry"]), 1, 1, 0, _x, 1 ]; _selDone pushBack _x; }; } forEach _sel; if (_obj getVariable ["debugAct",true]) then { _numDoors = [configFile >> "CfgVehicles" >> typeOf _obj, "numberOfDoors",0] call BIS_fnc_returnConfigEntry; for "_door" from 1 to _numDoors do { _UAOpenCfg = (configFile >> "CfgVehicles" >> typeOf _obj >> "UserActions" >> format ["OpenDoor_%1",_x]); _obj addAction [ format["Door %1",_door], {_type = typeOf (_this select 0); hint _type; [nil,configFile >> "CfgVehicles" >> _type >> "UserActions"] call BIS_fnc_configviewer;}, _x, ([_UAOpenCfg, "priority", 11] call BIS_fnc_returnConfigEntry) + 1, true, true, "", "", ([_UAOpenCfg, "radius", 1.75] call BIS_fnc_returnConfigEntry), false, ([_UAOpenCfg, "actionNamedSel", format["Door_%1",_door]] call BIS_fnc_returnConfigEntry) ]; }; _obj setVariable ["debugAct",false]; }; }];
Additional Information
The actions should be visible exactly when Open door/Close door appear.
It is particularly noticeable when you step to the left and right of Door 8 of the Industrial Shed Object
Left (>15m)
Right (<15m)
On the big dome, nothing shows since everything is >15m from center
Tested on Dev 1.77.143345 using actionNamedSel from building UA configs
Event Timeline
Comment Actions
Can we also have a look at the "Get In" user actions on the Huron helicopter rear ramp selection?
The user action disappears when you get too close, causing users to have to back up to get the action.
Comment Actions
Tweaked: User actions now work if closer than (bounding sphere radius + 15 metres) to the center of an object (https://feedback.bistudio.com/T126959)
Tested with release 1.82.144647, issue is resolved.