Hexagonal Graph rectangle shape

Hi,

I would like to shape an hex graph to be a rectangle as I will probably be using it on a relatively large map and would like to avoid unused cells as much as possible

I found this post : https://forum.arongranberg.com/t/how-to-hexagon-graph-constrained-to-rectangular-shape/5491

Is there any new material to achieve this since then ? Can I do so with custom generators or by overriding some of the GridGraph behavior ?

Thanks

Hi

No, the reasons for not doing it are pretty much the same as described in that post.
You can technically create a custom graph generator which does this, but be aware that the grid graph has a lot of optimizations under the hood that probably make it consume less memory and be faster than a naive attempt at a custom graph.
I’d recommend not worrying too much about the wasted regions. They will use a bit of memory but they will not impact pathfinding performance much (if at all).

Alright I understand, I will stick to the grid graph then. Thanks for the fast answer.