godot-gdhexgrid icon indicating copy to clipboard operation
godot-gdhexgrid copied to clipboard

Support for pointy-top layout

Open anissen opened this issue 6 years ago • 2 comments

This is a great implementation of the hex grid library. I'm missing the layout option for pointy-topped hexagons however. I'm using this tileset which only has pointy-topped hexagons. The implementation could be made to take the layout orientation into account (see e.g. https://github.com/droxmusic/HexMap/blob/master/HexMap/HexMap.gd).

I hope you'll consider this addition or, alternatively, have some pointers on how to convert your library into using a pointy-topped layout. Thanks!

anissen avatar Sep 27 '19 21:09 anissen

Hi, thanks, and sorry for the slow response. I've been out of the Godot-verse for a while.

The first way to implement point-top hexes that comes to mind is to use flat-top orientation, and simply rotate the camera! :laughing:

It would be nice to implement pointy-topped natively, but I'm concerned about how much more complicated (or duplicated) it would make the calculation code. I wonder how useful it would be just for HexGrid to be able to automatically convert godot<->grid coordinates in either flat or pointy mode. I can't promise any action toward this any time soon though.

romlok avatar Oct 19 '19 12:10 romlok

Okay, thanks for taking the time to reply :)

anissen avatar Oct 20 '19 20:10 anissen