Is there a way to cause a sprite to cut from the texture when I scale it, instead of scaling the texture?
An example would be a textured health bar. Rather than scaling the texture down, I want to only use 50% of the texture if I set the width of the object to 50%, and cut off the rest.
There's probably some way I could do this with Blending modes, but doing it for each UI object would be pretty complex. Is there a simple way?
If your sprite doesn't have animations, the easiest way would be using the tiled background object.
If it does have animations using the blendmodes would be your best option.
Develop games in your browser. Powerful, performant & highly capable.
You might also be able to use the 9patch object