Instructions:
click in the space above the cart to launch the ball.
Explanation:
The x and y motions are independent. The cart always stays in the same x position as the ball, unless there is an acceleration acting on the ball, like drag.
Link to stand-alone sim: Here is a link to view the sim on its own, with no distractions.