If your nav mesh is poorly laid out, this can result in taking extra long paths just by bad luck (and it looks really strange).
We can improve this by using the polyanya algorithm. We don't actually care about its straight line path, but we can store the nodes we pass through as the corridor and recreate the same kind of path we use today (so only the pathfinding algorithm needs to change, particularly the AStarProblem we create).
If your nav mesh is poorly laid out, this can result in taking extra long paths just by bad luck (and it looks really strange).
We can improve this by using the
polyanyaalgorithm. We don't actually care about its straight line path, but we can store the nodes we pass through as the corridor and recreate the same kind of path we use today (so only the pathfinding algorithm needs to change, particularly the AStarProblem we create).