Polycode provides a particle system that can be added to any Scene or other Entity.
The Polycode particle system is based around theSceneParticleEmitter class, which subclasses the SceneMesh class and can be textured and have materials applied to it like any other SceneMesh (see Materials and shaders). Particle emitters can either continuosly emit particles or act as triggered emitters which emit all particles at once.
You can place particle emitters in the IDE entity editor. To place a new particle system, click on the "Add Entity" button on the top left of the entity editor and choose "Add Particle System".
After adding the particle system, you can move it like any other entity in the entity editor and edit its properties in the property editor as well as set its material.
Polycode comes with two default particle materials in the Global pool. "Particles" and "ParticlesAdditive", but of course, you can assign whatever material you want as well.
See Properties of particle systems for a list of all parameters that you can edit in the propery sheet.
You can create particle systems in code as well by instantiating the SceneParticleEmitter class.
Scene *scene = new Scene(Scene::SCENE_2D); SceneParticleEmitter *emitter = new SceneParticleEmitter(300, 2.0, 1.0); emitter->setParticleSize(0.05); emitter->setGravity(Vector3(0.0, -2.0, 0.0)); emitter->setDirectionDeviation(Vector3(0.0, 0.0, 25.0)); emitter->loadTexture("water.png"); scene->addChild(emitter);