I have following scenario. I have dynamic objects in my scene for which I calculate which grid graph nodes they occupy (can be seen in screenshot as black squares). When I click the target object and I’m out of reach of the any of the target nodes, I want to evaluate path to distance x (skill use range) from that target node. With single target nodes I’ve usually used EndingConditionProximity. However, now that I want to check against all the node positions that are occupied, I have to make many path requests. In some cases some of those nodes are unreachable (and in this example multiple of them are), which causes me to request many paths that take maximum evaluation even from close distance.
To sort this out, I was planning that I could use MultiTargetPath to only get the shortest path. However, it seems that MultiTargetPath does not support ending conditions and therefore I couldn’t stop finding my path in the range I want to.
What would you suggest as best option to work in such scenario?
So, in practice I want to search multiple targets and pick the closest one but I also want to have proximity ending condition. And I’d like to do that without having to go into extremes with some paths, looking extremely long routes where there are none available. I was also thinking possible shortcuts in a way that I would maintain shortest currently found path as part of traversal provider which would likely minimize the hits, but then it’d be still bit about luck on getting path targets in good order and also the would need some distance information that I currently cannot seem to get in traversal provider.
I’m currently using A* Pathfinding Project Pro 4.3.40.