easystarjs icon indicating copy to clipboard operation
easystarjs copied to clipboard

Feature request: Avoiding ZigZag

Open Torsten85 opened this issue 7 years ago • 1 comments

Hey, just found this library and its really great!

Would it be possible to add an additional cost for changing direction? This way I could avoid the zig zag (which is of course the correct shortest path).

The problem is explained by another user on stack overflow: https://stackoverflow.com/questions/26302126/efficient-path-finding-algorithm-avoiding-zigzags

Torsten85 avatar Dec 04 '18 12:12 Torsten85

Have you tried calling easystar.enableDiagonals(); ?

MathiasGilson avatar May 17 '19 18:05 MathiasGilson