I have several RichAI agents wandering on navmesh, where only the closest one (closest path) should walk towards player.
I know that I can use ABPath.Construct to calculate path for each seeker to the player, but how can I compare which is the shortest path between all those seekers?
I could maybe cheat and put seeker on a player and do StartMultiTargetPath and then get closest AI so I engage that one, but it’s not that “clean” solution I’m looking for
I need the one where closest agent mean he will get fastest to the player.
So if there’s agent closest to the player in Vector3.Distance, but there’s an object in between so agent needs to go around, and in that case some other agent would reach player faster, I need to find that agent which would reach player faster than others
Thanks, was wondering if there’s another way to do it only once.
If I do this, I’ll have to, when I find shortest ask agent, to calculate again from agent’s position if I understand correctly.