In this demo, we allow the user to move the ball around by flicking it! Here's how we define a flick: if a touch (or click) starts inside the ball, then we've started a flick. When the touch (or click) is released, then give the ball some velocity proportional to the vector between where the flick started, and where it ended.
Let's check out the TODOs to see how it's done.