Android UI Placement and Stretching

Godot Version

4.2

Question

Hello! I’ve been making some clones of well-known games to try and get a good grasp at both using godot and game design in general. Right now, I’m making a zelda clone for android devices to try and learn how developing games for mobile devices generally is. But currently, when I test my game on my own phone, the ui elements I’ve made for touchscreen controls are skewed to the left of the screen. When I run the game on my computer, it is positioned fine. But I guess my own phone’s aspect ratio is wider than the average. How can I get my ui to dynamically stretch to the edges properly to account for this?

Here’s a documentation page that explain how to support multiple resolutions Multiple resolutions — Godot Engine (stable) documentation in English

thank you for this! But I’ve found a new issue. Now my ui, instead of just being skewed to the left, is now bunched up in the top left corner on my phone. The root node for the ui is a control node itself. Should that not be set to the full rect anchor?

sorry, scratch that last comment. It resolved itself when I fiddled with the ui’s placement in my camera node

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.