ExamplesByMesh icon indicating copy to clipboard operation
ExamplesByMesh copied to clipboard

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

Open Qqwy opened this issue 12 years ago • 1 comments

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 avatar Sep 19 '13 14:09 Qqwy

I've created a pull request here: https://github.com/mikechambers/ExamplesByMesh/pull/7

Qqwy avatar Sep 19 '13 21:09 Qqwy