xaguzman / pathfinding

Java pathfinding framework.
Apache License 2.0
97 stars 27 forks source link

JumpPointFinder crashing when allowDiagonal is true #3

Closed titoasty closed 9 years ago

titoasty commented 9 years ago

JumpPointFinder is crashing when allowDiagonal is true. I tried disabling diagonals and seems to work

xaguzman commented 9 years ago

Could you post your stacktrace and maybe provide a file with your graph set up?? El feb 9, 2015 11:26 AM, "titoasty" notifications@github.com escribió:

JumpPointFinder is crashing when allowDiagonal is true. I tried disabling diagonals and seems to work

— Reply to this email directly or view it on GitHub https://github.com/xaguzman/pathfinding/issues/3.

titoasty commented 9 years ago

I managed to make it working, and it was all my fault ! It was a bad initialization of GridCell, not passing column and row as parameters of the constructor. And by the way, I think passing an array of GridCells to a NavigationGrid should automatically set the x and y of GridCells, don't you think ? It was kind of confusing...

But anyway, it's working fine ! (and I'm very glad you implemented jps, which is very fast, yours even seems faster than my implementation due to reutilization of objects. nice job on your library !)

xaguzman commented 9 years ago

I didn't have time to look into this, but I am glad you got it working, I was a bit insecure about the diagonals in JPS as it came out a bit hacky,

Also, good to see some people get benefits from using this lib :)