What heuristics do programmers use in A* pathfinding for NavMeshes?
NavMesh = Navigation Mesh, its a type of pathfinding that uses meshes instead of waypoints.
|
What heuristics do programmers use in A* pathfinding for NavMeshes? NavMesh = Navigation Mesh, its a type of pathfinding that uses meshes instead of waypoints. |
|||||||||
|
|
Take your pick: http://theory.stanford.edu/~amitp/GameProgramming/Heuristics.html There's a load of heuristics described in that link, either for speed or accuracy. There's always a trade-off, so I would assume that developers would use the most accurate heuristic that would cause minimal impact to their game's performance. |
|||||||
|
|
A very, very rough (but very speedy) heuristic to use is: (Manhattan distance)
This avoids any square rooting, which could be costly (Pythagorean distance). |
|||||||||||||
|