I have a tri-hexal tile system that switches out 6 triangular slices of a hexagon tile. The effect is a wang-tile triangle grid acting like a hex grid. It adapts itself to its neighbours for a more natural procedurally generated hex grid, this is the function I'm currently working on.
Right now my hex grid generates and I have two land types: Earth and Ocean.
The hex grid is populated, water and earth randomly generate, but now I need to program the neighboring slice behavior.
I have a lot of game objects in my scene.
I populate the scene with a diagonal staircase of game objects that are rotated to form a hex grid from top down, and that stores position data.
Next I have a list of hex tile game objects which are tied to the x and z world positions of the above game objects, thus retaining real world transformations. Meanwhile I can leverage hex cube coordinataion. Within each tile; eg land, ocean etc, there are 6 game objects representing the 6 slices of tile.
Given that there can be up to 2500 tiles, each with their own 6 slices stored as children, I want a solution that won't bump that number up by much.
I want to keep those children, without the need to replace or add to the number of game objects, so I'm trying to find the child and apply a mesh filter with a specified mesh inside. After a lot of fiddling around with every likely action, I've found no sollution.
if you don't know how I can achieve this, please let me know what you'd do to get similar results.
Warm regards,
Simon.