Hexagon grid

Hi people,



i know that the question was asked some times… but the posts i found was old and the solutions didn’work.



I got got a Node with all my Terraininformationen and now i want to do a Grid of Hexagons on this.

The Projekt will be an RTS Game.



The Problem ist, that the Hexagon class of Jmonkey isn’t longer in the shape package. and another solution of a hexagon uses a method of mesh, that isn’t supported any more too.



Now the question ist, what is the best and performanced way to do this.



The Grid should be visible… my first idea was a hexagon of lines, but for each hexagon i have then 6 lines and i dont think that i will have a good performance. In Adition i want to be able to color the hexagon to show the player that he can build there.



Is there be a simple way of doing this oder do i have to code my own shape class.



thanx for your help.

Custom mesh?

@normen said:
Custom mesh?


You mean i should do a hexagon in blender and use this for the grid ?

Nope. I mean your grid should be one mesh that you generate procedurally, voxels, like every “box world” https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:custom_meshes

Ok i will try this, thanx for the help. i will reply if i got a working code.