Hi @gudrutis1,
For case #1, you could detect the first “moved” phase as the starting point, and the “ended” phase as the ending point. In this case, you would not want to set focus on the ball, because that would look for touch points outside of its boundaries, and the “ended” might not fire until the touch was far outside the ball (I doubt you would want that to be used for the calculation).
For case #2, you could detect the first “moved” phase (using focus in this case), store that as point as your starting point, and then start a 1 second timer. Once the timer triggers, you would just check where the touch currently is and do your calculation from the starting point.
Hope that helps,
Brent