我有一个粒子系统,我以下列方式使用它
DustParticle = CCParticleSystemQuad::create("dust_texture.plist");
Vec2 pos = Vec2(
BadSprite->getPositionX()
BadSprite->getPositionY()
);
Vec2 World = BadSprite->getParent()->convertToWorldSpace(pos);
Vec2 Node = BadSprite->convertToNodeSpace(World);
DustParticle->setPosition(Node);
BadSprite->addChild(DustParticle);
现在,BadSprites 向左移动会发生什么,但是粒子效果似乎停留在它启动的位置,它是否也假设在其父级向左移动时向左移动?关于可能发生的事情有什么建议吗?当作为子项附加时,粒子效果的行为是否有所不同。我知道如果我附加了一个精灵,它将跟随父母。