how to track the path of ball flowing motion in cocos 2d
For example in angry bird game video the bird flowing motion. they display the path. likewise i want
You could accomplish this by using an NSTimer or CADisplayLink to repeatedly use the coordinates of the thing in its path of movement (e.g. 6 times a second) and display a small dot at that coordinate. The timer would begin, for example in angry birds, when the bird is first launched, and then stopped when the bird hits something.
You could use the CCMotionStreak Cocos2d class which utilizes CCRibbon. Check out Riq's MotionStreak test on github (onEnter:)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With