private Point getWorldCollision(Dynamic obj, Texture target) {
        Rectangle r = obj.getCollisionBox();
        Point lowerLeft = new Point(r.x, r.y);
        Point upperRight = new Point(r.x + r.width - 1, 
                r.y + r.height - 1);
        int cell = World.CELL_SIZE;

        //If x is negative, offset by 1. It sucks but is necessary.
        if (lowerLeft.x < 0) {
            lowerLeft.x -= cell;
        }
        if (upperRight.x < 0) {
            upperRight.x -= cell;
        }
        
        //Convert pixel coordinates to world coordinates.
        lowerLeft.x /= cell;
        lowerLeft.y /= cell;
        upperRight.x /= cell;
        upperRight.y /= cell;
        
        //Test for overlap with the target block type
        for (int x = (lowerLeft.x); x <= (upperRight.x); x++) {
            for (int y = (lowerLeft.y); y <= (upperRight.y); y++) {
                if (world.getCell(x, y) == target) {
                    return new Point(x, y);
                }
            }
        }
        return null;
    }