@Override
    public void updatePosition(float delta) {

        // constrain player within window
        position.x = Math.max(
                Math.min(position.x + velocity.x*delta, SCREEN_WIDTH - 200), 100);
        position.y = Math.min(Math.max(position.y + velocity.y*delta, GUI_HEIGHT),
                SCREEN_HEIGHT - PLAYER_HEIGHT * 2);
        setPosition(position);
    }