Adding a dust particle effect to the player character

We now want to create a dust particle effect which will appear whenever the player character is running on rocks. The effect is going to stop as soon as the player stops moving or if the player is no longer grounded on a platform.

First, we will need to design a custom particle effect that looks like dust. The following screenshot is an example of what we are aiming for:

Adding a dust particle effect to the player character

Open or restart the Particle Editor to begin with the default fire particle effect and apply the following modifications to the editor and emitter properties:

  • In Pixels per meter, enter 200 for Value:
  • In Size, enter 0.75 for High: ...

Get Learning Libgdx Game Development 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.