A small demo of how you interact with a tilebased grid. Documented source code included and the math behind it is fairly basic. Basically it builds a grid from code, rotates for 5 seconds every 5 seconds and highlights the tile your mouse is over. I couldn’t find a good example online so here it is.
All the documentation is in the source code, and here is the image the code refers to:
Download the sources here: Hexagon sample (946 downloads)