I have a situation where many objects ( around 100 ) need to find the path but having the same target? Is there any function available which can find the path from different position to same final position in a single call?
Thanks
I have a situation where many objects ( around 100 ) need to find the path but having the same target? Is there any function available which can find the path from different position to same final position in a single call?
Thanks
Hi
Yes, there are actually two ways.
You can either use a multi target path: http://arongranberg.com/astar/docs/class_pathfinding_1_1_multi_target_path.php
Or you can use a FloodPath combined with a FloodPathTracer path which is handy if you do not know all the source points in advance (such as when repeatedly spawning new enemies in a tower defense game): http://arongranberg.com/astar/docs/class_pathfinding_1_1_flood_path.php
You can check out the PathTypes demo scene which shows both multi target paths and flood paths.
Both of these path types are only available in the pro version.