Very noobish question....sorry

Godot Version

4.6

Question

This is my current tree, I am trying to make it so that DisplayWindow, anchors to the 0,0,1,1 of my screen to scale properly. But I am unable to make it scale appropriately based on monitor width. Now for the room size I set 1920,1080, I do not want this, so i tried making it 0,0. But no matter what I do it seems to want a room size. I know I have to move the green anchors but they just wont budge. Any idea on how to fix this. I look at several UI videos on youtube but they just seem to grab it and it moves, or when they change the anchor to 0,0,1,1 it just moves. I am at a lost.

Any help would be appreciated.

Thank you,

1 Like

Your root node StatMenu is of type Node2D, which is not fully compatible with Control node types, which is probably the reason why it behaves funny.

I suggest you to change your root node’s type to CanvasLayer and then the DisplayWindow (if you even need that intermediate node honestly…) should be just stretched with anchors_preset set to Full Rect.
You might also need to play around with these settings to actually make your window be responsive to resolution changes:

1 Like

You don’t have to make the root of a scene a CanvasLayer, but controls definitely work better if they are the children of a CanvasLayer.

I’m curious why would you want to keep your root node type as a Node2D if the immediate child is a CanvasLayer that disregards this Node2D’s properties?

Node2D is the base class for the set of classes that I use to represent scenes in my game. The node you are seeing in my screenshot is one of those classes. They make my life much easier when it comes to changing scenes or persisting data.

1 Like

Thank you so much for the help, I ended up going with the canvas layer, works great.

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