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

BoundNodes do not use width and height for retrieve() calls #6

Open
Qqwy opened this issue Sep 19, 2013 · 1 comment
Open

BoundNodes do not use width and height for retrieve() calls #6

Qqwy opened this issue Sep 19, 2013 · 1 comment

Comments

@Qqwy
Copy link
Contributor

Qqwy commented Sep 19, 2013

I am trying to use this QuadTree implementation as a collision detection algorithm with lots of tiles.

however, it seems that there is no special _findIndex() method in the BoundNode class. This means that no matter the size of the colliding object, only the top left corner will be used to determine what objects to retrieve.

This is easily fixable by adding an extra check in the retrieve() function as well as an extra function that simply returns all the contents of a certain node. I'll upload my own fix shortly.

@Qqwy
Copy link
Contributor Author

Qqwy commented Sep 19, 2013

I've created a pull request here: #7

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