Panda3D Manual: Loading Particle SystemsThe Panda3D engine uses text files for storing particle configurations, which are usually created with the Particle Panel. Before being able to use particles, you'll need to tell Panda3D to enable particles: base.enableParticles() This function tells Panda3D to enable its built-in physics engine which is also used by particles. To be able to create ParticleEffect objects, you'll need this import: from direct.particles.ParticleEffect import ParticleEffect Next, create a ParticleEffect object and tell it to use a particle configuration file. p = ParticleEffect() To start the ParticleEffect, do this: p.start(parent = render, renderParent = render)
ParticleEffect inherits from NodePath, so you can use NodePath methods like To reset the ParticleEffect, use: p.reset() To stop the ParticleEffect, use: p.disable() To completely remove the ParticleEffect, use: p.cleanup() Note that Like p.saveConfig(filename) © Carnegie Mellon University 2010 |