How about if I change the ball's gravity to the centre of the cylinder when it comes within range?

I'm not sure how then it would rotate with the cylinder, though.