Moving UI with camera

Godot Version

v4.3.stable.official [77dcf97d8]

Question

I have a player scene that contains the camera, I am trying to add a UI that will stay static on the screen as the camera moves, following the player. I have been told I need a CanvasLayer, but no matter where I put the Canavas layer, as a child of the world, as a child of the player rigidbody2d or the player Camera2D, it stays fixed in the world.

image

image

Where should I put the CanvasLayer?

1 Like

Which UI element in this example is staying fixed in the world?

2 Likes

Has it been set to “Top Level” in the visibility section?

1 Like