Godot Version
4.5
Question
How to nudge AStarGrid2D to favour paths with less turns/longer legs in the beginning and paths away from solid points?
From experimenting with the heuristics Manhatten has the most pleasing results most of the times. I do not allow diagonal movement.
var astar = AStarGrid2D.new()
astar.diagonal_mode = AStarGrid2D.DIAGONAL_MODE_NEVER
astar.default_compute_heuristic = AStarGrid2D.HEURISTIC_MANHATTAN
astar.default_estimate_heuristic = AStarGrid2D.HEURISTIC_MANHATTAN
astar.update()
Obviously symmetrical paths can differ in turn positions. I would like less turns and later in the path (close to the destination). Some solutions are clingy to solid points (resulting in more turns than necessary). I assume I need a different heuristics for compute() and estimate().
Any ideas, hints?