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 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.