Gui.set_position different in build and editor (SOLVED)

Hey,

i have a problem with gui.set_position. I know, that the gui position is not equal to the position in the world.

Now i need to know, how i can set the position of one node like i want. I need it to be above the first pillar, which has a widht of 80. I thought the x of my node has to be 40 then. Should be better to use dynamic variables, so i used this:
local x = (gui.get_width() / amount_of_x_grid) * 0.5
And i got as result:

Editor:


HTML-Build:

The sound-button is on different locations, and i dont know why.

So, my question is:
How can i get the same position for Build in Editor, HTML and Android build?

The gui and the rest of the graphics are rendered in two different passes. If you are using a custom render script these two might not align. Also, the gui has an adjust mode that will reshape and adjust the gui nodes.

Oh wow, changed the adjust mode and it works.
Thanks :slight_smile:

1 Like