Fixing the jump button in the right bottom corner

I want to place a virtual control jump button on the right bottom corner in the game and it should not move when the game window size changes as I will upload it to the Android app store so Android phones have different screen size.
How can I fix the virtual control jump button that it stay in the right bottom corner irrespective of the different phone screen.
Please help me…


Note: You can see that jump button is not in the right bottom corner. But in gdevelop editor it is in right bottom corner.

There is a behavior, called ‘Anchor’ that you can add to the button and you can use that to keep the button in relative position on the screen.

@ddabrahim

The jump button is now going out of the window screen and it is enlarged now.

You must anchor the top and the left (respectively to the bottom and the right of the window). Not the right and the bottom of the object, otherwise that will resize the object (yep it’s true that it’s not intuitive)

1 Like

Jump button problem is solved.
New problem: there is a restart button in the new layer(game over) not in base layer but both the layers are in one scene. So when I play the game and accidentally touch the location (where my restart button is placed in game over layer) in the base layer the game restarts. But the restart button in not there but still the game restarts when the exact location of restart button is touched/pressed in the base layer.
How to fix this problem.

Add a condition checking if the layer is visible

No the game over layer is hidden… It only pops up when player dies

Yeah, that’s why I say you should add a condition to check if the layer is hidden on your event.