I am using Chipmunk Space Manager. I have my space setup with one ball and a bunch of segments (512 in my case) joined together to make a circle.
My aim is to force the ball to move in that circle as user moves the device. The faster user moves the device, faster the ball will move in circle. The ball has to follow all physical laws as well.
I am getting gravity and userAcceleration components from CMMotionManager but unable to make some sense out of it.
I tried applying force manually and that works realistically, but I am unable to move the ball in the circle depending on how much user moved the device. Like if I put a small ball in a glass and shake the glass, the ball will move in the circular bottom of the glass and comes to rest in the direction of tilt of glass when there is no more external force moving/tilting the glass