added setYVelocity and check for max yVelocity