So I have a bunch of animal NPCs in my project. These guys need water right? I have lakes and rivers where they can drink. Problem is I don’t know how to generate the location they should go to when they are thirsty. I tried creating a handful of locations on the shores and randomly choosing one but they always end up overlapping on one eventually:
What I’ve thought of doing: Manually creating a whole lot of points along the shores and saving them all in an array. Each element will have a boolean assigned to them which will determine if the spot is already taken by another animal or not. Make a Task in the BT which will return the nearest drinking spot that isn’t taken.
Is this a good idea? If it is, what aproch would be best to implement it?
Could you create a custom property on your land tiles/or terrain objects to specify it is drinkable, then use A* pathing to get to the nearest drinkable tile?