Game Programming using Qt 5 Beginner's Guide - Second Edition
by Pavel Strakhov, Witold Wysota, Lorenz Haas
Rendering particles
So far, we have used a bare ImageParticle element to render particles. It is only one of the three ParticlePainters available, with the others being ItemParticle and CustomParticle. However, before we move on to other renderers, let's focus on tweaking the ImageParticle element to obtain some interesting effects.
The ImageParticle element renders each logical particle as an image. The image can be manipulated separately for each particle by changing its color and rotation, deforming its shape, or using it as a sprite animation.
To influence the color of particles, you can use any of the large number of dedicated properties—alpha, color, alphaVariation, colorVariation, redVariation, greenVariation, and blueVariation. The ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access