prettymuchbryce/easystarjs

Feature request: Avoiding ZigZag

Torsten85 opened this issue · 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

Have you tried calling easystar.enableDiagonals(); ?