Skip to content

With ParticleSystem::PositionType::FREE mode, The emitted particle still follow the emitter position when set a rotation for particle. #8384

Open
@minggo

Description

@minggo

Note

This issue is migrated from here. It was created at 2014/03/27 06:13:58 +0000

Description

Use this code in DemoFlower::onEnter():
`
ParticleDemo::onEnter();

_emitter = ParticleFlower::create();
_emitter->setEmissionRate(50);
_emitter->setRotation(-30);
_emitter->setAngleVar(0);
_emitter->setAngle(90);
_emitter->setRadialAccel(0);
_emitter->setTangentialAccel(0);
_emitter->retain();
_background->addChild(_emitter, 10);
_emitter->setTexture( Director::getInstance()->getTextureCache()->addImage(s_stars1) );

_background->stopAllActions();

setEmitterPosition();`

Move the particle by mouse/finger, the emitted particle will follow the emitter.

  • boyu0 added comment:
    Since we have ParticleSystem::setAngleVar(); and ParticleSystem::setAngleVar(); method, the demand of rotate a ParticleSystem is not that common.
    Fix this bug has lots of "transform" work to do, without an inclusive test, add this fix to 3.0 is not safety, and it also has some performance lost.
    So I changed this issue to "Candidate for next 3.0 release".
    And here is the PR link for someone who urgent need this fix:
    closed #4577: With ParticleSystem::PositionType::FREE mode, The emitted ... #6127

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions