0 votes

Hello everybody,

I am new to godot game engine. so, from last couple weeks, i am learning game development from BornCG tutorial. in one of the tutorial (part 12) where he creating panels. he is putting panel in the relation of the game window not in the relation of camera. i am just little curious. any help is appericated. thank you.

in Engine by (12 points)

1 Answer

+1 vote

GUI should not be child of the Camera... If you want a smooth camera movement in relation with the character, or if you implement camera shake (very very comon), you would end up moving also the GUI, and thats not usually desired effect.

The best way for all GUI imho is to add them as childs of a CanvasLayer node, so they always stay fixed in the screen, no matter what happens to the Camera, player, or whatever other node.

by (3,400 points)

Thank you for responding. whenever i create panel and i put in the relation of window. i can't see that panel in game.

You should share here how you are setting up your scene and panels. Its hard to tell without seeing your specific setup.. or perhaps you could make a small project whith the issue and share it so i can test.

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 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 webmaster@godotengine.org with your username.