how to start and stop the emitters for particle effect

Discussion of issues specific to mobile platforms such as iOS, Android, Symbian and Meego.
Ananditha Roy
Kobold
Posts: 30
Joined: Wed Mar 14, 2012 2:25 pm

how to start and stop the emitters for particle effect

Post by Ananditha Roy »

Hello ,

I am working on the Particle effect , I can able to successfully run the smoke effect . Now i want to start and stop the the emmitters , i.e., When i click on the start button , emmiters need to emit , and is shows the smoke effect and when i click on the stop button , smoke effect need to stop . For this i using this ,
creating the particle system

Code: Select all

Ogre::SceneNode* headNode = mPivotNode->createChildSceneNode(Ogre::Vector3(100, 0, 0));
    smokeParticle= OgreFramework::getSingletonPtr()->m_pSceneMgr->createParticleSystem("Smoke", "Examples/Smoke");
    headNode->attachObject(smokeParticle);
    

In the stop button Action :
smokeParticle->removeAllEmitters() ;
In the start action
smokeParticle->addEmitter("Point");
.. It is not working , How can i do that .. Plz
Thanks&Regards