-
Notifications
You must be signed in to change notification settings - Fork 1
Pros
The motivations to create this project was to implement a basic algorithm in javascript (Quadtree) to detect collisions.
I have seen another implementations but most of them seems to have some level of artifacts or corner cases. The method set is highly inspired on this try from timohausmann: quadtree-js example here
Bugs and corner cases present in other approachs.
This is one of the bad behaviours commonly detected, not only the nearest squares are marked as positives but some others in the Cartesian axis or randomly positioned.
Current implementation. This is how it should behave, discarding all squares far from our collision zone.
This is another common bug present in most implementations. When you hold your collision zone between four spaces those scripts are unable to handle this cases and start processing all present squares.
Current implementation. This should be a much more correct handle, this implementation discards far squares even in a difficult case like this.



