Position a scaled control in the right side,

Godot Version

4.3

Question

How can get a scaled container aligned to the right side of the screen and be responsive?

I tried in several ways. It is easy to align a container which is not scaled to the right side. But a scaled container seems to be using the original resolution x scale factor as reference to position, creating an unwanted effect

I want to align the text in the right side and those 4 triangles to the right side of the screen It should be responsive. But when I try to move it, it just moves outside the window

this is my current node config
image

If I set the anchor of the MarginContainer2, which is the div containing the text and the triangle symbols, to the right side, it moves far from the area

There is a CanvasLayer which is scaled x6 so I can display pixel art in 1080p resolution

In summary. It is possible to align a container to the right side, which is children of a scaled canvasLayer?

Many thanks!!

2 Likes

Have you tried a different scaling option? Options<Window<Strech<Mode: Canvas_Items
This will scale the canvas items to match the resolution which can make some objects look elongated if its a weird resolution but it can stop problems like objects going offscreen.

It is set already to canvas items :frowning:

I might be missing something in fundamental. The issue resides in the scaling. If I don’t scale, it looks correct

try use center container maybe help

Doesn’t work, now, the content is centered based on the total resolution x scale factor, not aligned to the right side.

Have you tried to see if it working without the margin containers to try and pin down the source of the problem or would that not be possible with your setup?