Page MenuHomeFeedback Tracker

Side panel gps map icons rotating incorrectly
Feedback, NormalPublic

Description

"Side panels" gps "locked" mode is rotating the player icon and the "zones" on the map,

Only happens with icons where the map icons for players is a circle with a triangle infront this ALWAYS looks the wrong way as you start looking around, additionally a shaded area on the side panel map also misbehaves sometimes (it worked on the rectangular zones, the one in the video linked is Le Port on Malden)

This doesnt happen with the default player icon so im wondering if this is a gamemode bug, but i thought these "simple icons" were part of the base game so

The icon like this always rotates: https://cdn.discordapp.com/attachments/771003391773507644/977139366679953418/unknown.png
video of issue: https://youtu.be/RrHVXEhGvnM

Pay attention to look direction and the shape of the shaded areas

Launcher version: 1.5.149102

Game version: 2.08.149102

Branch: main / beta branch not specified

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Operating System Version
21H2 windows 11
Category
Ingame UI
Steps To Reproduce

load into a KOTH game, bring up side panels with ]
Cycle to the gps panel
Change side panel mode with Rctrl+] to the mode that is locked to look direction
look around and observe that the icon rotates when it shouldnt and the zone also rotates when it shouldnt

Event Timeline

Please file bug report with creators of KOTH, if it is a bug with the game, let them make a ticket with vanilla repro

I think that drawEllipse/drawRectangle shapes not being rotated along with the map is a bug. These are map shapes, no display shapes and their coordinates and dimensions should be relative to the map. I'll have a fix in the mission but this should be addressed on engine level if you ask me.

Not really. The issue is that drawEllipse and drawRectangle commands draw the shape as if CT_MAP* is facing north (normal not rotated map). Both these commands should rotate the shapes along with the map rotation. Can throw together a repro if needed.

BIS_fnc_KK added a comment.EditedFeb 26 2023, 5:52 PM

It cannot be just fixed as it may break missions where people used workarounds. It has to be a new map control or something

It cannot be just fixed as it may break missions where people used workarounds

I don't think many people have it fixed with a workaround (if any) because ctrlMapDir command is still only in dev branch and you have to do some trickery to get the map direction without the command. Plus rotating GPS is rarely used to even notice the issue. I think its worth to just fix it as soon as possible instead of leaving the bug in.

BIS_fnc_KK added a comment.EditedFeb 27 2023, 2:52 AM

Cant tell what is scripted and what is vanilla on that video. Can you make an Eden repro showing the problem?

BIS_fnc_KK changed the task status from New to Need More Info.
SaMatra added a comment.EditedFeb 27 2023, 3:50 AM

Cant tell what is scripted and what is vanilla on that video. Can you make an Eden repro showing the problem?

  1. Start a game with player that has GPS
  2. Open GPS, switch to rotating mode R.Ctrl+]
  3. Run this code in debug console:
	testcenter = getPosWorld player;

	if(!isNil"testrectangle") then {deleteMarkerLocal "testrectangle"};
	testrectangle = createMarkerLocal ["testrectangle", testcenter vectorAdd [50,50,0]];
	testrectangle setMarkerShapeLocal "RECTANGLE";
	testrectangle setMarkerSizeLocal [20, 50];
	testrectangle setMarkerBrushLocal "SolidFull";
	testrectangle setMarkerColorLocal "ColorRed";

	if(!isNil"testellipse") then {deleteMarkerLocal "testellipse"};
	testellipse = createMarkerLocal ["testellipse", testcenter vectorAdd [-50,50,0]];
	testellipse setMarkerShapeLocal "ELLIPSE";
	testellipse setMarkerSizeLocal [20, 50];
	testellipse setMarkerBrushLocal "SolidFull";
	testellipse setMarkerColorLocal "ColorRed";

	if(!isNil"testicon") then {deleteMarkerLocal "testicon"};
	testicon = createMarkerLocal ["testicon", testcenter vectorAdd [0,50,0]];
	testicon setMarkerShapeLocal "ICON";
	testicon setMarkerSizeLocal [2, 2];
	testicon setMarkerTypeLocal "mil_arrow2_noShadow";
	testicon setMarkerColorLocal "ColorRed";

	{
		if(!isNil{_x getVariable "testeh"}) then {
			_x ctrlRemoveEventHandler ["Draw", _x getVariable "testeh"];
		};
		_x setVariable ["testeh", _x ctrlAddEventHandler ["Draw", {
			params ["_map"];

			_map drawRectangle [
				 testcenter vectorAdd [-50,-50,0]
				,20
				,50
				,0
				,[0.9,0,0,1]
				,"#(rgb,8,8,3)color(1,1,1,1)"
			];

			_map drawEllipse [
				 testcenter vectorAdd [50,-50,0]
				,20
				,50
				,0
				,[0.9,0,0,1]
				,"#(rgb,8,8,3)color(1,1,1,1)"
			];

			_map drawIcon [
				 "\A3\ui_f\data\map\markers\military\arrow2_CA.paa"
				,[0.9,0,0,1]
				,testcenter vectorAdd [0,-50,0]
				,32 * 2
				,32 * 2
				,0
			];
		}]];
	} forEach (
		[findDisplay 12 displayCtrl 51]
		+ (uiNamespace getVariable ["IGUI_displays", []] select {ctrlIDD _x == ctrlIDD(uiNamespace getVariable "RscCustomInfoMiniMap")} apply {_x displayCtrl 101})
	)
  1. Observe that createMarker shapes are properly rotated and drawRectangle/drawEllipse/drawIcon shapes aren't.

I'd argue about not having to auto rotate drawIcon since its an "icon", which implies it should be depicted in display context first and shouldn't be auto rotated, but I'd prefer having it all consistent.

Alternatively, maybe introduce some kind of flag for map controls to auto rotate drawn shapes?

I think its better to bite the bullet and fix this, make drawRectangle/drawEllipse/drawIcon treat angle as world angle rather than UI angle, same as markers currently do.

Another related problem -- when GPS autorotation mode is enabled, tactical ping has wrong position:

BIS_fnc_KK set Ref Ticket to AIII-56546.Jul 31 2024, 8:47 PM

The ping should be fixed in Revision: 152064

I think its better to bite the bullet and fix this, make drawRectangle/drawEllipse/drawIcon treat angle as world angle rather than UI angle, same as markers currently do.

As much as I want to do this it can break things quite badly. Besides the workarund is rather trivial, it is to add ctrlMapDir _map + yourangle

BIS_fnc_KK removed BIS_fnc_KK as the assignee of this task.Jul 31 2024, 9:08 PM
BIS_fnc_KK changed the task status from Need More Info to Feedback.

I think its better to bite the bullet and fix this, make drawRectangle/drawEllipse/drawIcon treat angle as world angle rather than UI angle, same as markers currently do.

As much as I want to do this it can break things quite badly. Besides the workarund is rather trivial, it is to add ctrlMapDir _map + yourangle

Can it really break much? GPS is the only control that does rotating maps. Doubt there are many cases where this is fixed with a workaround right now, I bet most cases people are unaware that their draws are incorrect in rotating GPS. Again, I'm all for biting the bullet and fixing the bug the sooner the better.

BIS_fnc_KK added a comment.EditedAug 1 2024, 8:31 PM

Ok, a compromise, both drawRectangle and drawElipse will be defaulted to follow map but will have optional bool not to follow, since the most common usage is to mark area so it doesnt make sense it will not rotate with map. drawIcon will not be changed, because most common use to mark something with icon you want to stay vertical like tactical ping for example. This could be changed with adding ctrlMapDir to angle

SaMatra added a comment.EditedOct 8 2024, 5:48 PM

Updated repro to add rotation over time:

	testcenter = getPosWorld player;

	if(!isNil"testrectangle") then {deleteMarkerLocal "testrectangle"};
	testrectangle = createMarkerLocal ["testrectangle", testcenter vectorAdd [50,60,0]];
	testrectangle setMarkerShapeLocal "RECTANGLE";
	testrectangle setMarkerSizeLocal [10, 20];
	testrectangle setMarkerBrushLocal "SolidFull";
	testrectangle setMarkerColorLocal "ColorRed";

	if(!isNil"testellipse") then {deleteMarkerLocal "testellipse"};
	testellipse = createMarkerLocal ["testellipse", testcenter vectorAdd [-50,60,0]];
	testellipse setMarkerShapeLocal "ELLIPSE";
	testellipse setMarkerSizeLocal [10, 20];
	testellipse setMarkerBrushLocal "SolidFull";
	testellipse setMarkerColorLocal "ColorRed";

	if(!isNil"testicon") then {deleteMarkerLocal "testicon"};
	testicon = createMarkerLocal ["testicon", testcenter vectorAdd [0,60,0]];
	testicon setMarkerShapeLocal "ICON";
	testicon setMarkerSizeLocal [1, 1];
	testicon setMarkerTypeLocal "mil_arrow2_noShadow";
	testicon setMarkerColorLocal "ColorRed";

	{
		if(!isNil{_x getVariable "testeh"}) then {
			_x ctrlRemoveEventHandler ["Draw", _x getVariable "testeh"];
		};
		_x setVariable ["testeh", _x ctrlAddEventHandler ["Draw", {
			params ["_map"];

			private _angle = diag_tickTime % 10 / 10 * 360;
			testrectangle setMarkerDirLocal _angle;
			testellipse setMarkerDirLocal _angle;
			testicon setMarkerDirLocal _angle;

			_map drawRectangle [
				 testcenter vectorAdd [-50,10,0]
				,10
				,20
				,_angle
				,[0.9,0,0,1]
				,"#(rgb,8,8,3)color(1,1,1,1)"
			];

			_map drawEllipse [
				 testcenter vectorAdd [50,10,0]
				,10
				,20
				,_angle
				,[0.9,0,0,1]
				,"#(rgb,8,8,3)color(1,1,1,1)"
			];

			_map drawIcon [
				 "\A3\ui_f\data\map\markers\military\arrow2_CA.paa"
				,[0.9,0,0,1]
				,testcenter vectorAdd [0,-40,0]
				,16 * 2
				,16 * 2
				,_angle
			];

			_map drawRectangle [
				 testcenter vectorAdd [-50,-40,0]
				,10
				,20
				,_angle
				,[0,0.9,0,1]
				,"#(rgb,8,8,3)color(1,1,1,1)"
				,false
			];

			_map drawEllipse [
				 testcenter vectorAdd [50,-40,0]
				,10
				,20
				,_angle
				,[0,0.9,0,1]
				,"#(rgb,8,8,3)color(1,1,1,1)"
				,false
			];
		}]];
	} forEach (
		[findDisplay 12 displayCtrl 51]
		+ (uiNamespace getVariable ["IGUI_displays", []] select {ctrlIDD _x == ctrlIDD(uiNamespace getVariable "RscCustomInfoMiniMap")} apply {_x displayCtrl 101})
	);

As of ["Arma 3","Arma3",218,152239,"Stable",false,"Windows","x64"] both drawRectangle and drawEllipse always draw with dir=0

Updated repro script again, now includes blue shapes that have alignWithMap=false

POLPOX added a subscriber: POLPOX.Oct 9 2024, 9:55 AM