Editor visualization of gui objects, clarification needed

I’m a bit confused about how the editor shows the gui objects relative to the other objects…

I mean, in the editor, the GUI is shown with the bottom left origin in 0,0
On the other hand my tilemap is centered in 0,0
But if i start the game everything is aligned as if they were perfectly overlapping
A couple of screenshots to explain:

editor:
Screenshot_1

game:
Screenshot_2

1 Like

You typically render the game world in one step and the gui in second step. The gui usually rendered in screen space, meaning that it stays on screen regardless of any camera panning around in the game world. The game world on the other hand is usually rendered in world space, meaning that it could render centered on some position within your world, also possibly moving around, perhaps as a player character moves through the world. Are you using a camera or a modified render script?

1 Like

Rendercam in orthographic mode

I bet render cam will center view around the position it is given. Are you moving the camera or do you have it at 0,0?

it’s at 0,0 and i surely not moved it… in fact i moved my tilemap (originally built with bottom left at 0,0) to have it centered in the camera LOL

so it’s a rendercam “feature”
defold orthographic camera does the same?

Yes, but maybe I should add a camera anchor point option (bottom-left, center, top-right etc)?

i guess it’s a question for yourself. :slight_smile:

i understood your point about world/screen space, makes a lot of sense in hindsight… but for sure i can say that the current representation may be a bit confusing, especially with elaborated gui… however splitting screens in different GO using monarch can mitigate this