Collision detection improvements

Now detects distances to blocks instead of intersections