Health UI not following camera when attached to CanvasLayer

Godot Version



I am following the HeartBeast tutorials. He said to attach the Health UI to a canvas mode that way the hearts would follow the camera. But only the full hearts follow the camera. How can I fix that?

put the empty healths as the child of a CanvasLayer where the full healths ui at
mind show the scene tree?

i see, set both health UI layout anchor to top left
dont forget to make the healtUI Control node to be Full Rect Layout

For some reason that still didn’t change anything.

This is how they are set up.

i think i see what’s wrong, can you open the healthUI Scene and set it from there then, dont put the healths image on a scene node

I opened the health_ui scene and set it there. What do you mean don’t put the healths image on a scene node?

right now the healthUI is a scene that should contains whatever it has there, but right now you put the HealthUI Scene as a node in this CanvasLayer, then put 2 child in it

Sorry for the confusion. I didn’t add the 2 childs there. I just clicked on, open editable children. Ill show you how the UI_Health scene looks.

open the healthUI by clicking here
send what’s in there (the tree node)

as you can see the layout mode still position, also i assume the main health ui is still not full rect

now, first set the mode to anchor and make it full rect for the main parent node
then both the texturerect set it to top left by also changing it to anchor layout mode

after you done those, delete the 2 texturerect nodes in yellow text here

I did all of that, but the empty hearts are still chillin in the center whil the full hearts are in the top right. Sorry

then the next step is, to set the main parent position to x -576, y -324

Ok did that

But now all the hearts just dissapeared from the camera