Scaled object changes the 'visual' xy position on a screen

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By grymjack

I have a visual map with many objects that can be scaled at different levels, based on game factors, and can be placed at any xy position within the assigned area. The scaling, based on the star size, seems to throw off the visual xy position in the map vs. the xy position where I placed it in code. For example the star’s xy position in the linked picture via code was 330,299. When I place the mouse in the visual center of the object and do a get_global_mouse_position(), the result is 360,328. Sometimes I can get the wrong object if two objects are too close together. Any idea how to correlate the ‘visual center’ xy of the object on the screen with the xy position it was placed at in code? Thanks for any help.