Narendrabrsoft / cocos2d-android-1

Automatically exported from code.google.com/p/cocos2d-android-1
0 stars 0 forks source link

CCMove with Particleemitter moves all particles! #68

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. create CCParticleSun emitter
2. Move emitter with CCMove

What is the expected output? What do you see instead?
All Particles Move! With cocos2d-iphone only the particle source is moving. 
Animation-commands should only move the particle source and not all emitters.

What version of the product are you using?
cocos2d-android-1 0.99.4

Original issue reported on code.google.com by erdenkri...@googlemail.com on 18 May 2011 at 5:27

GoogleCodeExporter commented 8 years ago
Not a bug the default emitter mode for cocos2d android-1 is 
CCParticleSystem.kCCPositionTypeGrouped. To have free movement use this 
PARTICLE_SYSTEM.setEmitterMode(CCParticleSystem.kPositionTypeFree).

Original comment by thomashi...@gmail.com on 20 May 2011 at 6:22

GoogleCodeExporter commented 8 years ago
Thanks for the answer. Sincerely I didn't know that there are such emitter 
settings.

But setting the emitterMode don't had the desired effect for me. But I 
discovered that I got the effect with setting the position type of the emitter:

emitter.setPositionType(CCParticleSystem.kCCParticleModeGravity)

Perhaps this is helpful for other.

Original comment by erdenkri...@googlemail.com on 22 May 2011 at 7:47

GoogleCodeExporter commented 8 years ago
Yeah I had the same problem on my last project glad you found the solution.

Original comment by thomashi...@gmail.com on 23 May 2011 at 5:41

GoogleCodeExporter commented 8 years ago
Hi!
I think the problem is in the CCParticleSystem kPositionTypeFree variable must 
be kCCPositionTypeFree:

protected CCParticleSystem(int numberOfParticles) {
        totalParticles = numberOfParticles;

        particles = new CCParticle[totalParticles];

        for (int i = 0; i < totalParticles; i++) {
            particles[i] = new CCParticle();
        }

        // default, active
        active = true;

        // default movement type;
        positionType_ = kPositionTypeFree;

*************** And the kPositionTypeFree must be KCCPositionTypeFree: 
************

// default movement type;
        positionType_ = kCCPositionTypeFree;

Original comment by manu.msp...@gmail.com on 2 Jun 2011 at 12:24