Detection collisions with quadtree