Time for action — using the deflector plane

Being able to let particle bounce of some surface can be helpful, so that is what we are going to do here.

  1. Instead of the randomizer, use the DeflectorPlane affector:
    affector DeflectorPlane
    {
    
  2. The plane is defined using a point in space and the normal of the plane:
    plane_point 0 20 0
    plane_normal 0 -1 0
    
  3. The last thing to define is how the plane should affect the particles that hit it. We want them to keep their original velocity, so we select 1.0 as the value:
    bounce 1.0
    }
    
  4. To see the effect of the deflector plane, we need our particles to travel in slightly different directions. So modify the emitter such that the particles' directions differ with a maximal value of 30 degrees. Moreover, as the plane hovers ...

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.