AI can't find way in when he starts far away

Hey Guys,

i have a serious problem with my AI and the Move To Location.
Have a big area which only can be entered throu one huge door. When my AI Spawn near by the Door, like 2000m, he find the door and enter the area right.
But when he is far away he ran into the fence and go idle. AI can’t find the door.
I don’t know, maybe there is a option to scan a bigger area for a entrance or something?

Thanks, Sam

It makes sense that there are limits. I’m not sure how to change a threshold and make it work, but I could look into it. I just think the CPU usage will go up worse than linearly.

Another option: you could set waypoints along the wall. Do a distance test to the entrance area. If the AI is too far away from the entrance, path to the furthest reachable waypoint that is closest to the entrance. Keep hopping waypoints until the AI is close enough to the entrance. How graceful that looks will depend on tweaking. There might also be a way to determine if the AI can’t find a good path and just kick in when it’s confused.

Following a wall til you get to the entrance is pretty natural so it should look pretty good.

Hey, yes, nice hint. Will do so. You are right, CPU cost are important.
Thank you.

I will let this open, maybe there is someone who can tell us more about it, so we can understand whats going on behind the scene… :slight_smile:

Ok, i find a good way to do it.
I use “Find Path to Location Synchronisly”. The result is a array of waypoints. Then take the last waypoint, it is the nearest, and repeat “Find Path to Location Synchronosly”. My function is recursively :wink: