Changed quadtree to octree as we are operating in 3 dimensions