Godot Version
v4.2.1
Question
I’m trying to design a UI for a 2d pixel-art game that will work on multiple different aspect ratios. Through experimenting, it looks like the best way to do this is to make the UI texture “Keep Aspect Centered”. The problem is the “Keep Aspect Centered” option seems to completely ignore the whole UI positioning system, so if I for example add a button to that texture, the button will be in wildly different positions depending on the aspect ratio, completely defeating the purpose.
I then decided to look into just doing click detection via a script and forsaking subcomponents entirely since they don’t work with this system, but even trying to find the relative position of the click on the texture is extremely difficult because the click event’s position is relative to the size of the entire texture, not just the visible texture rectangle.
How is this option even expected to work at all in any real-life scenario? Am I missing something completely?
Example:
You can see the slots on the little backpack I want click detection for, and a button that’s a child of the texture. The button is way outside the bounds of the visible texture even though it’s a child of the texture.