Hey, everyone, I have come across this interesting problem. My dumb self cannot think of a solution, so I am asking here. Let’s see:
I have a map made up of 32,000 tiles (BaseParts) and I have NPCs which sometimes need to go to a certain part of a different color. The current system loops through all of the parts and finds the closest one to an NPC with a specific color. This system leaves some kind of “paths” when it recolors its destination to the color of its own, as shown by the first image.
I need the NPC to loop through all parts (with a minimal amount of Raycasts, if possible) and assign the destination, which would prevent the “exclaved paths”, as shown by the second image.
Any help would be gladly appreciated! Thank you.