Drawing clouds like shapes in cocos2D

Drawing clouds like shapes in cocos2D
0.0 0


Hi all,

Im new to cocos2D.

I would like to draw cloud like particles similar to the figure as one drags across the screen. I tried using CCParticleSmoke but I couldn’t control the spreading of the particle.


@ smoke = [[CCParticleSmoke alloc] initWithTotalParticles:100];
smoke.texture = [[CCTextureCache sharedTextureCache] addImage:"cloud.png"]; smoke.gravity = CGPointZero; smoke.startColor = _color; smoke.posVar = CGPointZero;

In gesture method

smoke.position = pointPosition; [smoke visit];

When I run my code, what happens is perpendicular cloud like particles appear though I dragged parallel. Cant get any clues about what to do. I don’t want particles to spread, but as in the above image.

Prior I was trying the idea as in the link http://www.learn-cocos2d.com/2011/12/how-to-use-ccrendertexture-motion-blur-screenshots-drawing-sketches/ in which the result is not fair

Please someone help me doing this as in the first image. Any timely help is appreciated.



just modify what you’ve got already, and instead of draw a texture every x miliseconds while you touch the screen, draw them everytime you touch location have changed by x amount (delta distance between the last drawn location)


Hi thanks for your reply. I just made it as your idea, but the edges are blurred as in
can you suggest me how to get rid of the blurness and get sharp edges without being fadded as in

Thanks in advance.