Page MenuHomeFeedback Tracker

addAction selections more than 15m from center do not work.
Closed, ResolvedPublic

Description

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.

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Scripting
Steps To Reproduce
  1. Place an Industrial Shed and Big Dome in the editor or find them.
  2. Run SQF below in debug console when in-game
  3. "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

Jaffa created this task.Oct 20 2017, 8:31 PM
Jaffa edited Steps To Reproduce. (Show Details)
Jaffa edited Additional Information. (Show Details)
Wulf changed the task status from New to Reviewed.Oct 25 2017, 12:23 PM
Wulf added a subscriber: Wulf.

Hello.

Thank you for the report. We will have a look at it.

MDCCLXXVI added a subscriber: MDCCLXXVI.EditedNov 15 2017, 9:58 AM

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.

It's an intended hard coded limitation.

It's an intended hard coded limitation.

And this ticket is about adjusting the limitation.

Jaffa added a comment.EditedApr 13 2018, 7:50 PM

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.

Wulf closed this task as Resolved.Apr 16 2018, 11:03 AM
Wulf claimed this task.