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

Are x and y swapped in the grid? #16

Closed
dpaola2 opened this issue Sep 10, 2020 · 1 comment
Closed

Are x and y swapped in the grid? #16

dpaola2 opened this issue Sep 10, 2020 · 1 comment

Comments

@dpaola2
Copy link

dpaola2 commented Sep 10, 2020

I'm getting TypeError: undefined is not an object (evaluating 'this.gridNodes[position.y][position.x].getIsWalkable') when I try to call aStarInstance.findPath(...). Looking at that error, it looks like the grid in configuration is reversed - shouldn't x be the first dimension of the array, and y the second dimension?

It's causing some weird behavior in my app and am wondering if this is intentional.

@dpaola2
Copy link
Author

dpaola2 commented Sep 10, 2020

ah, disregard. I understand now.

@dpaola2 dpaola2 closed this as completed Sep 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant