0 votes

Good afternoon. Guys, I can't create a UI, the problem is to make the node with the UI be on the screen, it needs to be attached to the Camera2D, but this very camera already monitors the node where the player is, then the UI node repeats the movement of the camera (for Example, when the node with the player performs a jump or run, and accordingly the UI node does this), and is not static on the screen glued to the Camera2D. How do I make sure that the UI does not run after the position of the node (For example, the player), but is always static on the screen?

in Engine by (142 points)

1 Answer

+1 vote

You shouldn't add your UI as child of the camera.. You should make it child of a CanvasLayer node.

Look at the docs about canvas layers, UI is one of the use cases.

by (3,505 points)

I have read the documentation many times, but the scene does not move there, and I have the opposite...

Although okay, I'll read the documentation again... Thank You and good luck!

Hi! I think i dont understand your question then.. you want the ui to be always static on the screen, i.e. always visible in the same place in the monitor even though the camera is moving arround, right? If so, you need to put the gui as a child of a canvas layer instead of as child of the camera. What do you mean with "the scene does not move there"?

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.