How to implement a trail in cocos2dx

How to implement a trail in cocos2dx
0

#1

Hi all,

please any one give a logic for trail in cocos


#2

I think @tranthor can help you


#3

Trail? Explain with more details plz


#4

Look up
MotionStreak


#5
MotionStreak* streak = MotionStreak::create(0.1f, 3, 45, Color3B::WHITE, "res/Arsenal/blueStreak.png");
this->addChild(streak,-1);

#6

I’d like to implement a trail (like the sprites circle in ZumaDeluxe) that chase my sprite.I already used CCMotionStreak,

please give me some solution.


#7

We generally appreciate seeing some effort when you post topics :slight_smile:

If you don’t know how to implement something, something like: I want to implement a trail in Cocos2d-x. I don’t know how. I think I could try x,y,z.

In this case @bilalmirza gave you a start with MotionStreak. I’d suggest taking a look at the API-Ref for it: https://docs.cocos2d-x.org/api-ref/cplusplus/v3x/df/d2e/classcocos2d_1_1_motion_streak.html


#8

Sorry I don’t understand what you mean.


#9

Typing from my phone. Corrected. I apologize.