0 votes

i want to get size of all node in c .how to do that .

2)i have 3 children in HBoxContainer .so i want to put 1st children left side ,2nd children in middle and last one in right .and i want to put separation between them according to the screen width .please tell me

i am new in godot .

extends HBoxContainer

func ready():
#var a=get
position(Vector2( a.getviewport().size)-getsize()-Vector2(100,0 ))
var c=self.get_children()
for i in c:

Godot version 3.3
in Engine by (15 points)

2 Answers

+1 vote

Well, Control nodes have rect_size instead of size. But I think you should use the "Expand" size flag instead of trying to manually but separation between them.

by (8,528 points)
+1 vote

Answered this live on stream: https://www.youtube.com/watch?v=fC3384meGZA

by (608 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.