Skip to main content

You couldcan create the mesh in Blender (or otheranother 3D modeling program).

After you did that, you couldcan create a 1single channel texture (red for example), where at the start of the health bar, it is 0, it's 0 and it slowly fades to 11 until you get to the end of the mesh, like this: enter image description here

(Note: The choice of using 1 channel for the texture is just because you don't need the rest, you could use regular RGB/RGBA texture if you'd like)Note: The choice of using only one channel for the texture is just because you don't need the rest, you could use regular RGB/RGBA texture if you'd like.

Than,Then create a shader in your engine of choice, and you could use the health of the player and the texture above, to cut out the health bar as you like.

Here is an example in Unity: https://answers.unity.com/questions/14770/creating-a-circular-progressbar-timer.html

You could create the mesh in Blender (or other 3D modeling program).

After you did that, you could create a 1 channel texture (red for example), where at the start of the health bar, it is 0, and it slowly fades to 1 until you get to the end of the mesh, like this: enter image description here

(Note: The choice of using 1 channel for the texture is just because you don't need the rest, you could use regular RGB/RGBA texture if you'd like)

Than, create a shader in your engine of choice, and you could use the health of the player and the texture above, to cut out the health bar as you like.

Here is an example in Unity: https://answers.unity.com/questions/14770/creating-a-circular-progressbar-timer.html

You can create the mesh in Blender (or another 3D modeling program).

After that, you can create a single channel texture (red for example), where at the start of the health bar it's 0 and it slowly fades to 1 until you get to the end of the mesh, like this: enter image description here

Note: The choice of using only one channel for the texture is just because you don't need the rest, you could use regular RGB/RGBA texture if you'd like.

Then create a shader in your engine of choice, and you could use the health of the player and the texture above, to cut out the health bar as you like.

Here is an example in Unity: https://answers.unity.com/questions/14770/creating-a-circular-progressbar-timer.html

Source Link

You could create the mesh in Blender (or other 3D modeling program).

After you did that, you could create a 1 channel texture (red for example), where at the start of the health bar, it is 0, and it slowly fades to 1 until you get to the end of the mesh, like this: enter image description here

(Note: The choice of using 1 channel for the texture is just because you don't need the rest, you could use regular RGB/RGBA texture if you'd like)

Than, create a shader in your engine of choice, and you could use the health of the player and the texture above, to cut out the health bar as you like.

Here is an example in Unity: https://answers.unity.com/questions/14770/creating-a-circular-progressbar-timer.html