Showing player stats like health appropriately on the screen

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By miqdadn

So i am creating a 2d platformer and to the player (kinematicbody2d) i added a script so that when i move left or right , the whole body will scale by -1 so as to make the character face the correct direction(by flipping the entire body).I had a camera attached to the body as a child and there is no visible issue or anything even though the camera is also flipping with the character. But the problem is, i want to show a label depicting Player’s health on screen.When i child it to the camera, whenever the player changes direction, as the camera flips, the label also flips(in other words, gets scaled by -1).Is there any way i can show the label on screen always but not be affected by the camera in anyway or do i have to start over everything??I want the cam to always follow the player.

:bust_in_silhouette: Reply From: exuin

It looks like you want to create a GUI. Don’t attach the health label to the camera. Instead, put it on a separate CanvasLayer that won’t be affected by the camera movement. There are some cool GUI tutorials in the official docs.

:bust_in_silhouette: Reply From: Bot7

You must use for example a Label on a Control Node. Here is a Video https://www.youtube.com/watch?v=pVK_QzQPv4o&t=96s