How do I get a label to follow the camera?

Godot Version

4.2.1

Question

My hierarchy looks like this:

Player
	Camera
		Label

When the player moves, the label follows the player, and not the camera. How do I get the label to follow the camera, and not the player?

A structure that looks like this works better:
image
The root node holds two layers, one for the GUI, one for the game world, and a camera.
Then you can set the GUI layer to follow the viewport and the game world layer to not follow the viewport.
Camera nodes should not have descendants. In general, there is no actual meaning in having a descendant of a camera, as the camera is just a view into something else, not a container.

1 Like