Radial/Circural HealthBar

Hi

I’ve created a radial health bar from this tutorial → Circled-shaped HP bar with alpha mask - Debugging, Optimization, & Profiling - Unreal Engine Forums ← and It works flawless, but what I need to change, to create radial health bar, but halfround I mean only 180 degrees?? The tutorial show only 360 degrees health bar…

Hm, 0.5 seems to be 180 degree, so why don’t you just devide the whole thing through 2 :smiley:

CurrentHealth / MaxHealth is for example 200 / 400 = 0.5, and 400 / 400 = 1.0
With 400 as MaxHealth. If you want ot have maxhealth at 0.5 you just need to divide it again through 2.

(400 / 400) / 2 = 0.5.

I also thought so, but unfortunately this is not so easy… scalar parameter value 0.5 is 180 degrees but the pivot of clipping mask is the center of the image. So result is incorrect. The pivot of clipping mask should be offset to the left side of my image, not into the center like actually.

I don’t really get want you want to achieve. You want the open part of the circle at the left side and not at the bottom?

Look to the pic I’ve uploaded.

You could just use a full circle, so that it will fit the Mask again.
Make a full circle and only use half of it.

Or you need to adjust the UV of your halfcircle. Since you are only using half of the mask, just use the “Texture Coordinates” Node and plug it into the half circle texture. Now set UTiling to 2.

First way “creating full circle” is working good, and another way “texcoord set to Utiling 2” not working properly.

I could use a first way, but this is still not “perfect” and creates a little mess in UMG, any other idea to do this?

Btw very big thanks eXi for help and interesting!

Hm, it’s hard for me to give a the perfect advice, because i never really worked with the material editor till now. Can’t you create your own grayscale Mask but only vor 180°? Then it would match your texture :X

I can’t imagine something different from rescallen with UV or directly creating mask and texture alligned to each other.

I’ve solved it! it was very simple, I just used a node “custom rotator” and plug constant2vector to “rotation center” with value 0.5,-0.5.

Thanks for helping eXi!