Page MenuHomeFeedback Tracker

Side panel gps map icons rotating incorrectly
Need More Info, 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.