0 votes

My tree is build this way:

root
-> Player
-> ->Camera2D
-> CanvasLayer (GUI)
-> -> Gui Stuff (Labels etc.)

The Camera2D follows the player, that works fine. But the GUI stuff is not shown at the camera's current position.

What can i do?

Godot version 3.2.3
in Engine by (45 points)

That's really weird, that should work

Maybe there's a problem with the CanvasLayer? While it should be independent of where it is placed in the scene tree, maybe it's following a different transform than the player or camera transforms? Have you tried making the CanvasLayer a child of the Camera2D?

I already tried that, but it didn't solve my issue :(

Try to debug the screen larger. Are those GUI's is static? if yes, then your problem is in the viewport

1 Answer

0 votes

The canvaslayer must be a child of the player. Brother of the camera. And the camera has to be in current mode.

root:
    Player:
        GUI
        Camera
by (226 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.