Added a second version for detecting collisions by checking less grids...