pathfinding icon indicating copy to clipboard operation
pathfinding copied to clipboard

penalizing diagonals

Open jagenjo opened this issue 7 years ago • 0 comments

Hi:

Im using this library but the problem is that when using the Diag functions sometimes it goes in diagonal even to cross a horizontal corridor.

The reason is because it has the same cost to move horizontally than diagonally, and by preference it seems to priorize diagonals.

I was wondering if it could be easy to add a cost function of sqrt(2) on diagonals.

Cheers

jagenjo avatar Jul 27 '18 18:07 jagenjo