-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any way to make diagonal paths less free? #39
Comments
Oh, good idea. That shouldn't be too hard to implement, since the diagonal option is already on the Graph, we would just need to modify the neighbors call to check isWall() on the relevant nodes before adding them to the neighbors list. The options available in pathfindingjs seem reasonable. We would want to treat Here is one proposal:
And then convert What do you think about that idea? |
Yeah, that seems great! I actually made that issue before looking at your code, and I found it eminently readable! I was able to make the change in my local copy, but I added more options instead of extending the "diagonal" option (e.g., |
Sounds great, could you file a PR with your updated changes? |
Sure, I'm at work now, but I'll submit one later today. |
Okay pull request submitted. |
was this ever fixed? |
As far as I can tell, diagonal paths are free right now, meaning moving between walls whose corners touch is possible, like this: http://imgur.com/l8T5Dur
Is there any way to add in the option to disallow this behavior, preferably something as fancy as multiple options like this: http://pathfindingjs.readthedocs.org/en/latest/user-guide/diagonal-movement/
I really like how lightweight and fast your project is!
The text was updated successfully, but these errors were encountered: