Hide/Show part of a GameObject

Hello

I have a GameObject that has the mesh of an arrow.

I want this arrow to “power” up like a power bar.

My idea is to have 2 arrows in the same place where one of the arrows is hidden.

Then when the user presses “Space” the hidden arrow slowly begins to be revealed, however I have no idea how to do this.

The idea is similar to this: (Except this is 2D)

http://www.basketball-games.net/play/crazy-hoopz.htm

alt text

I suggest researching animated textures. You COULD fade in the gameobect based on the material’s alpha, but it will fade in the whole gameobject. You could also do it in a shader, but it would be rather complicated. I suggest looking at animated textures first.,The simplest solution would be using an animated texture. You COULD slowly fade in a gameobject using the materials alpha value, but you will only be able to fade in the whole object. You could also possibly write a shader to do it, but it would be rather complicated. Research animated textures first. If you feeling ballsy research some shader stuff. You will need to use a mask for the arrow, then scale and interpolate the colors based on the height. Hope this points you in the right direction.

After a lot of research I ended up using masking which I achieved by reading and using this unifycommunity.com

If you want a really simple solution, another possibility is to put a cube in front of the area you want to hide and make it the same color as the background.