public float moveY(float amount) {
        float newY = worldY + amount;

        if (newY > maxOffsetY) {
            float moved = maxOffsetY - worldY;
            worldY = maxOffsetY;
            return moved;
        } else if (newY < minOffsetY) {
            float moved = minOffsetY - worldY;
            worldY = minOffsetY;
            return moved;
        }

        worldY = newY;
        return amount;
    }