Say i have a sprite thats however many pixels in width and i want it to reflect how much health an object has.
It has a private value, 100 being full health and 0 being dead, whats the maths to make the sprite width shrink proportionaly to the value?
thanks.