Fix label to a camera and make it static

Godot Version



Hello, I’m trying to display a label with the life points of the player, the problem is that when the player moves (it is a grid-based movement game) the label inside the Camera2D sort of “bounces” (the camera has smoothing on too) and I can’t find how to make it stay in place. If I put the Label anywhere else it is left behind because it’s outside the camera.

Could you possibly provide a video on the issue?

Here’s a gif
Imgur: The magic of the Internet

You should use CanvasLayer.

Create a new CanvasLayer node and add the Label as a child of the CanvasLayer node.
Your scene tree should look similar to this:

This works, because Camera2D has (with default settings) no impact on CanvasLayer and its children nodes.

Thank you that worked

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.