0
votes

I want to know the best approach to make a sprite ball move within concentric circle using accelerometer in cocos2d. Ive used the equation of the circle to see if the sprite lies within the circle or not.

1

1 Answers

0
votes

Find next position of your sprite according to accelerometer input, check if it lies within your area, if yes, update sprite's position.