Hey! In my game I’ve got repair bots which search for nearest machines to fix. Everythings set up expect the AI goes to the nearest machine even if the path is blocked for example if a machine is in a locked room. Is there a way to check if the AI can reach a target?
Someone else had a similar question before with no answers: How can I check if a target's position is reachable by my AI?
I’m looking for something like this (I made the “canReach” up as that is something I’m looking for);
List <GameObject> allMachines;
foreach (GameObject g in allMachines) {
if (AILerp.canReach (g.transform.position) == true) {
// This machine can be reached by the AI bot
}
}
Thanks!