I asked this in the forums but I thought it might be better to ask here. I hope that is ok.
I am pretty new to unity, but have a bit of an OpenGL background. I have a plane with a texture on it that contains a map (for a TBS). The map is going to have a hexagonal grid (although the lines will not necessarily be drawn on). I would like to be able to highlight (by lightening) a selection of tiles to display the range of movement and darken certain tiles for fog of war. What would be the best way of doing this?
asked Jul 19 '10 at 07:30 PM
One way you could do this is with ParticleEmitters. If you are very new to Unity your best bet is to check the Penelope tutorial because they use Particles to represent 2D sprites for the Orbs you collect, and you can easily modify that code into an overlay system you can use for your game grid. Also it ends up only costing 1 draw call if you do it right.
Make a 50% gray hexagon texture with appropriate alpha channels and then use that as the particle, and in the Particle Renderer set it to "Horizontal Billboard". Then use a lighter color in the shader to lighten the texture below it, a darker one to do the reverse. Different colored ones to indicate movement or attack range, etc.
answered Jul 19 '10 at 09:55 PM