Hello all,
I’m struggling to figure out the best way to handle this scenario. Basically what I have now is a scene with a sphere made of cubes like this:
At the end of the day I just have one parent node that is the large sphere, and then dozens of child nodes that are the squares in the image above. However the big difference between what I have and this image is that behind all of these cubes is another colored triangle-cubeish shape that keeps going until the center.
The code I have working now allows a user to click on a color and it will alter all of the cubesin the scene that are that color.
As you can see in this image there are two yellow cubes in the lower right corner next to each other, what I want to happen is that when you click on one of those yellow cubes it will search all of the other cubes around it in any direction (including the z-index, horizontal, and vertically) and only change the colors of those cubes that are touching the hit cube.
I’m not asking for anyone to write my code for me, but I’m at a loss with the best way to even approach solving this problem.