I am wondering how to resize a GUItexture, so that it shrinks from the right, instead of the middle. I am assuming I will have to reposition it every step, but I want to confirm that and see if anyone has a solid method for handling this.
It’s the adjusting of the position.x, relative to the scaled size of the bar that’s getting me thus far.
amount = (health/1000);
//energyBar.guiTexture.pixelInset.width = (amount);
energyBar.transform.localScale.x = 1 * amount;
energyBar.transform.localPosition.x = -0.015 + (0.015*amount);
As you can see I’ve tried a couple of methods to no avail. 0.015 is it’s placement with full health.