YouTube doesn't want you know this subscribers secret
Get Free YouTube Subscribers, Views and Likes

3D Health Bar in Godot 4

Follow
Robin Lamb

How to make a 3D health bar in Godot 4 for your game using a ProgressBar, a Sprite3D, and a SubViewport texture, and how to subtract life from the health bar. Note: The health bar needs to be the child of the SubViewport not the SubViewport's parent scene.


Chapters
00:00 Introduction
00:17 Creating the health bar with a progress bar and styling it
02:35 Adding a SubViewport and adding the health bar as a child
03:00 Adding Sprite3D and setting its texture to the SubViewport, and putting it in billboard mode
03:35 Changing the value of the health bar back to 100
04:20 Adding script to subtract life from the healthbar
04:45 Adding a timer and setting up the scene to test the healthbar

posted by strokkakj