How to implement a trail in cocos2dx

Hi all,

please any one give a logic for trail in cocos

I think @tranthor can help you

Trail? Explain with more details plz

Look up
MotionStreak

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

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.

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

Sorry I don’t understand what you mean.

Typing from my phone. Corrected. I apologize.

1 Like