Reputation: 827
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
Upvotes: 7
Views: 1191
Reputation: 111
You could use the CCMotionStreak Cocos2d class which utilizes CCRibbon. Check out Riq's MotionStreak test on github (onEnter:)
Upvotes: 2
Reputation: 46
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.
Upvotes: 3