#Trying to center a label node with a Node2D as it's parent

16 messages · Page 1 of 1 (latest)

lunar glacier
#

When I center the label node by clicking Layout => Center, it goes outsides the game area instead of centering inside the game area. How would I go about centering the node? I know I've done something like this before, but I've forgotten a lot of Godot since I haven't used it in about a year

arctic thicket
#

Layout tends to only work properly, if the nodes' parent is itself a Control.

#

I think that's the issue here.

lunar glacier
#

I'll try it out later today since it's 2am EST rn

lunar glacier
#

or this?

#

because both of them aren't working as expected

lunar glacier
shy basin
#

center puts it in the middle of the parent control nodes rect, not the middle of the screen

lunar glacier
#

so how would I center a node then?

shy basin
#

you can make the parent control "full rect", then it will be centered

lunar glacier
#

oh wow

#

thanks

#

it works 💀

shy basin
#

👍

lunar glacier
#

marking this as solved now