- Home /
How can I outline selected cells on a grid?
I'm working on a game with a hexagonal grid. Currently, I have a physical hexagon that floats just above the ground, but that will only work if the ground is flat. I want to be able to add several selections of different colors. For example, you might have one color signify the selected unity, another color signify the position you're trying to move it to, another color showing the shortest path, and another color showing all positions that unit can reach in one turn. This means I have to be able to layer dozens of these hexagons without slowdown.
Projector looks like it would work perfectly, but I've seen stuff saying that using it more than a few times would slow the game down. As long as I use something with a UV map that corresponds to x and y position, I could add a transparent texture, but I've also heard that more than a few layers of that would cause slowdown. Does anyone know what would work best?
Answer by Owen-Reynolds · Jan 03, 2015 at 06:24 PM
I'd just make a semi-transparent 3D hexagon, with a little height. Just tall enough to stick up above steep slopes. Easier to see, and I never much cared for the distorted projector look anyway.
Could even sample several points on the edges of the hex, and position it nearly flush with the highest.
Your answer
Follow this Question
Related Questions
How to properly modify a multi-material object shader? 0 Answers
SpeedTree shaders are not working with Projectors 0 Answers
is there a way to make a gradient material, white to black, in Unity3D? 2 Answers
procedurally generated gradient 2 Answers
Can't apply Skybox material to Skybox type variable 1 Answer