I have a second map element that is 338x338 in size and I'm trying to add a 338x338 HUD element to the map using anchors like "WEST:0, SOUTH:0", but for some reason the image isn't positioned properly and I have to offset it 23 pixels from the south and west for it to fit as it should. The icon size of the game and the icon size of the map element are 64 if it matters.
Help appreciated.
Copyright © 2024 BYOND Software.
All rights reserved.
338/64 = 5.28125
The object occupies 384 pixels (6 tiles) since it overlaps into the sixth tile, but is only 338 pixels visually.
384-338 = 46
This means you have 46 pixels of excess space in the map element's renderable area.
In order to center the hud element inside that second map, you have to offset it by half of the excess space:
46/2 = 23
The secondary maps attempt to center on the tile area taken up by all objects inside of it, so that extra 23 pixels is completely intended and you have fixed the problem.