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.
Find next position of your sprite according to accelerometer input, check if it lies within your area, if yes, update sprite's position.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more