What is the best way to generate a 3D grid ?
If you are mousing over and you want to know what grid you are on, it's easy if it's a square, but it's hard if it's a hex. I know it can be done. Even with mine, I used circles for static bodies. I'm sure I could have done something like it mathematically, but I had enough trouble just lining up the stupid hexes on the grid. Attaching astar neighbors was bad. I was OK until I hit the end of the rows, etc. because the hex is shifted on the next row so there might be one to the left or to the right. Sure, maybe I'll try it sometime, but not tomorrow.
- Edited
Utilize the instancing feature in Godot to create a large grid efficiently. By creating a single grid cell as a scene, you can then instance it multiple times in a grid pattern using the InstanceMesh or InstancePlaceholder nodes. This method reduces memory usage and improves performance when dealing with extensive grids.
found information