Take a look here: Hex Snapping, you can drag the 'fighters' hex around but I would like it to snap to the hexes as it moves around. How would I do that?
Develop games in your browser. Powerful, performant & highly capable.
If each hexagon is a different object instance you can do this:
If you want to do it with math instead here is a formula for it: