Skip to content
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

Can't restrict diagonals #3

Closed
jdm opened this issue Dec 29, 2022 · 1 comment
Closed

Can't restrict diagonals #3

jdm opened this issue Dec 29, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@jdm
Copy link

jdm commented Dec 29, 2022

Hello! I appreciate this crate's straightforward interface, but it would be most useful to me if there were some way to restrict the paths so that diagonals movements were never considered. I tried replacing all moore_neighbourhood with neuman_neighbourghood and move_distance with manhattan_distance, but I got stuck on the use of moore_neighbour, so it seems like the diagonal assumption is pretty baked in right now.

@tbvanderwoude
Copy link
Owner

Hi! Good that you bring this up, this definitely sounds like a good generalization. The assumption of diagonals is indeed pretty much baked into the algorithm as it stands, in particular the JPS implementation. It should be possible to add an allow_diagonals flag or something equivalent however.

@tbvanderwoude tbvanderwoude added the enhancement New feature or request label Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants