Would appreciate any advice anyone has on this problem, been trying to fix it for a few hours now to no avail.
So, I've got a series of shaded Hexagons, which are all the same object, and are stacked edge to edge in the 2D plane, as shown below.
After these are spawned, which is done procedurally through data in an Array, I want to Pin each Hexagon to their adjacent Hexagons.
I have a function to do this, which is shown below.
This function seems to do sod all however, and I've tried many variants, none of which seem to work. I've created a second family for the Object, so that the "For Each" loop doesn't single out one Hexagon for each overlap check, however other than that i'm out of ideas.
Does anyone know where I might be going wrong?
I need the Hexagons to be pinned to their adjacent Hexagons so that when some are destroyed leaving two separated blocks, they now behave as separate collected objects