Making particles move

Apart from fading and rotating, the particle systems we have seen so far were very static. While this is useful for making star fields, it is not at all useful for explosions, sparks, or even falling snow. This is because particles are mostly about movement. Here, we will show you two aspects of making your particles fly.

The first aspect is modeling how the particles are born. By that, we mean the physical conditions of the object creating the particles. During an explosion, matter is pushed away from the epicenter with a very large force that causes air and small objects to rush outward at an extremely high speed. Fumes from a rocket engine are ejected with high velocities in the direction opposite to that of the propelled ...

Get Game Programming using Qt 5 Beginner's Guide - Second Edition 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.