Time for action – stir up some dust

A speeding car looks faster with rally stripes, but it looks twice as fast when it also stirs up some dust!

  1. Make a copy of Main.java and name the class Particle1DustSmoke.java. Remember to also refactor the first line of the main() method to Particle1DustSmoke app = new Particle1DustSmoke();.
  2. Copy the included file assets/Effects/smoke.png into your project's assets/Effect directory. It includes a sprite animation of a dust cloud.
  3. Create a class field for the ParticleEmitter object and initialize the emitter in the simpleInitApp() method. Give the emitter a descriptive name and tell it to keep 100 particles of type Triangle ready (from the com.jme3.effect.ParticleMesh.Type package).
    private ParticleEmitter dustEmitter; ...

Get jMonkeyEngine 3.0 Beginner's Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.