Time for action — adding a particle system

We are going to use the code from the last example:

  1. Create a particle system that uses a predefined particle script. Add the particle system to the same scene node that the Sinbad entity is attached to:
    Ogre::ParticleSystem* partSystem = _sceneManager->createParticleSystem("Smoke","Examples/Smoke");
    _SinbadNode->attachObject(partSystem);
    
  2. Compile and run the application. There should be a large amount of smoke coming from Sinbad.
    Time for action — adding a particle system

What just happened?

We used an already defined particle script to create a particle system, which we attached to the same node that our entity was attached to. This way, the particle ...

Get Ogre 3D 1.7 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.