Health Bar shown on screen

Hi @Emmalyn_Rotter,

It’s a little tricky, and there are several concepts you will need to understand:

  1. Camera View Mode - click the Camera and press F on your keyboard to jump in and out of the camera. This is important for positioning various parts of your HUD (Heads-Up Display).

  2. Scaling - you will need your HUD to be really small and really close to the Camera, so it doesn’t get covered up by other items in the scene. If you double-click on your HUD item to bring up the Object Inspector, click Transform and then you can manually transform the Scale down as low as 0.01

  3. Parent-child attachment - in the Scene Inspector (top left tab), which displays a list of all the objects in your scene, you will need to drag your HUD item (child) onto your Camera (parent) so that it becomes attached to the Camera.

That is your basic HUD setup.

To make a health bar also requires coding with Typescript and an understanding of variables, so that you can transform the length of your bar based on health status. I have created a basic demo below:

Hope this helps. Let me know if you have any further questions. If this solves your problem, please mark this post as the Solution.

Many thanks,
Geoff @ TechLeap

2 Likes