In Unity3d, we commonly used the pathfinding algorithm:
1.a* algorithm plug-in and greedy algorithm is not the same, greedy algorithm suitable for dynamic programming, to find local optimal solution, does not guarantee the optimal solution. A * is the most effective way to solve the shortest path in a static mesh. is also time-consuming algorithm, not to seek frequent occasions. Generally suitable for the needs of precise occasions. As with heuristic search, it is possible to adjust the accuracy according to the change of grid density and grid dissipation. Good place to use: A. Strategy search for strategy game B. Lattice pathfinding in block lattice game
2.u3d self-contained navigation grid system u3d built-in Navmesh navigation grid system, in general, most of the navigation mesh algorithm is "Corner point algorithm", specifically we can check. The efficiency is relatively high, but the optimal solution algorithm is not guaranteed. Use a better place: A. The monster pathfinding in the game Scene B. Motion avoidance obstacle
3.WayPoint pathfinding plug-in is the fastest, but the corresponding performance is also very limited, it often go "Z" type of trajectory, is not suitable for the use of complex occasions. For example, it cannot change the travel path based on width, height, path-point dissipation, etc. Good place to use: A. Tower Defense Monster Marching Path b.ai patrol Route
probably a simple one said, in fact, we all have a bottom in mind, what circumstances with what. Does not say that a pathfinding can take all occasions or want to adapt to all occasions. The choices are based on demand.
* Algorithm, navigation grid, Path point pathfinding (A-star vs NavMesh vs Waypoint)