Time for action — time to live and color range

Again we are going to add some parameters to our particle system to see the effect they have.

  1. Change time_to_live to be a range with a minimum and maximum:
    time_to_live_min 1
    time_to_live_max 10
    
  2. Do the same for the color:
    color_range_start 1 0 0
    color_range_end 0 0 1
    
  3. Adjust your application code; then compile and run it. You should see different colored particles and some will disappear before others.
    Time for action — time to live and color range

What just happened?

Instead of using single value parameters, we used parameters that described a range of values and let Ogre 3D pick the exact values. This added diversity to our particle system and can be ...

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.