Time for action — adding a scaler affector

  1. To show what an affector does, we need a simple Point emitter that emits 30 particles per second with a speed of 20 units and 100 seconds of life:
    emitter Point
    {
    emission_rate 30
    direction 1 0 0
    velocity 20
    time_to_live 100
    }
    
  2. During the whole lifetime of a particle, we want it to grow five times its size per second. For this, we add a Scaler affector:
    affector Scaler
    {
    rate 5
    }
    
  3. Compile and run the application. You should see particles that get bigger with each second they live.
    Time for action — adding a scaler affector

What just happened?

We added an affector that changed the size of our particles for their complete lifetime. The Scaler affector scales ...

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.