Clip image

So I want to make an HP bar where the inner image is a texture rather than a flat image.
How do I clip this image based on a float? The best I can think is manually setting it’s UV and width every frame.

The UV/width technique would work. Otherwise you could have two elements. The parent element acting as the clipper would have overflow set to hidden and its size would change. A nested element of fixed size could display the full-size texture.

1 Like

the nested element of fixed size needs to adapt to it’s grand’s parent size, but I guess since I am using code to solve it anyways, might as well.