Hi, i have a problem over here. I am making a hp bar. The following code shows the hpbar texture being covered as hp is decreasing.
But it is decreasing from right to left. What I need was to get the hp bar decrease from left to right? Any idea how to get it done? Thanks
var hpBar1 : Texture2D;
function OnGUI()
{
GUI.BeginGroup(Rect(50, 50, hp1 * hpBar1.width, hpBar1.height));
GUI.Label(Rect(0, 0, hpBar1.width, hpBar1.height), hpBar1);
GUI.EndGroup();
}