Time for action — adding fireworks

It's always nice to see a firework after a special event.

  1. Create a particle system that bursts different-colored particles in all directions at a steady interval:
    particle_system Firework
    {
    material Examples/Smoke
    particle_width 10
    particle_height 10
    quota 5000
    billboard_type point
    emitter Point
    {
    emission_rate 100
    direction 0 1 0
    velocity 50
    angle 360
    duration 0.1
    repeat_delay 1
    color_range_start 0 0 0
    color_range_end 1 1 1
    }
    }
    
  2. Create five instances of this particle system:
    Ogre::ParticleSystem* partSystem1 = _sceneManager->createParticleSystem("Firework1","Firework"); Ogre::ParticleSystem* partSystem2 = _sceneManager->createParticleSystem("Firework2","Firework"); Ogre::ParticleSystem* partSystem3 = _sceneManager->createParticleSystem("Firework3","Firework"); ...

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.