Are you sure its the front node that isn’t showing?
In my testing when I set the back node to clip-only then it will only show the front node.
I am wondering what the idea is here.
I am thinking that you will shorten the front image width as health depletes. Is that correct?
What image is the mask and what will the mask do as health changes?
Yep, the bright orange area shortens as health depletes.
To clarify, the back sprite is the background for the healthbar, and the bounding region for the healthbar (so all the other sprites can’t go outside that area).
The mask sprite isn’t meant to be shown, and only serves to cut the front sprite to have the effect I’m trying to achieve.
I hope this clarifies things!
I couldn’t find a way to make it work using sprites and clipping as a mask.
I agree with zoopira that a ProgressBar is the better route.
Since you have it angled you can’t just go with a background and fill color.
Set the theme overides for background and fill to StyleBoxTexture and either drag sprites in or if they are in a single spritesheet use an atlas.
The sprites should be a flat color without the vertical lines and border.
For that you will use a separate sprite containing only the vertical lines and border and everything else transparent.
I managed to get this to work perfectly but I am not sure I am explaining it well.
Maybe there is a better way but if you would like me to post an example project I will.
I meant to say that at value 0, the bar is completely full, but at value 1, it jumps to the second notch, and then all the consecutive values are only small increments.