Hi all,
I'm working on a game that uses hexagon-shaped board tiles. I'm trying to figure out how I can determine, given a mouse coordinate, which (if any) hexagon that coordinate falls within. Any suggestions on either some formula or some other way to think of the problem? If it proves too time consuming to figure out, I guess I could always just use the largest inner square that fits within a hexagon to approximate where the mouse is at, although it won't register in certain "dead" areas.
thanks...Dave
I'm working on a game that uses hexagon-shaped board tiles. I'm trying to figure out how I can determine, given a mouse coordinate, which (if any) hexagon that coordinate falls within. Any suggestions on either some formula or some other way to think of the problem? If it proves too time consuming to figure out, I guess I could always just use the largest inner square that fits within a hexagon to approximate where the mouse is at, although it won't register in certain "dead" areas.
thanks...Dave