added launchBall() function and fixed gamepad bug