i am trying to create a health bar using draw texture it is working fine for me but the by using draw texture the texture itself is moving from its original position and how to increase the health bar from bottom to upward direction(- y direction).I want my texture should gradually increase from its original position to the clamped value with out moving the texture from its original position.Is any other method is there for health bar other than draw texture or how to use draw texture properly to get the result i want.
http://answers.unity3d.com/questions/7846/how-do-i-make-a-progress-bar.html
i have tried the code used in above link for making a health bar it is working fine for me. The using above code the texture itself is moving from its original position i want the health bar should increase gradually from its original position. i want to increase health bar in (- y direction).in above code if i am fixing the texture position to
var pos : Vector2 = new Vector2(20,40);
the whole texture starts move upwards.can you please fix this error in my coding as i am new to coding
in my game i already have a texture called magical spell bar is there when player score increase the health of the player also increase in magical spell bar as yellow texture so i used above code i can i use draw texture to increase the health of the player when he get score in magical spell bar which is in rectangular shape in upwards direction(- y direction) from bottom to top direction
– robert_mathew