Moved ParticleSystemUpdater into ParticleEffect nodes to simplify usage
of nodes.
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include <osgParticle/RadialShooter>
|
||||
#include <osgParticle/AccelOperator>
|
||||
#include <osgParticle/FluidFrictionOperator>
|
||||
#include <osgParticle/ParticleSystemUpdater>
|
||||
|
||||
#include <osg/Geode>
|
||||
|
||||
@@ -128,10 +129,13 @@ void ExplosionEffect::buildEffect()
|
||||
// add the program to update the particles
|
||||
addChild(_program.get());
|
||||
|
||||
osg::Geode *geode = new osg::Geode;
|
||||
geode->addDrawable(_particleSystem.get());
|
||||
//geode->setCullingActive(false);
|
||||
// add the particle system updater.
|
||||
osgParticle::ParticleSystemUpdater *psu = new osgParticle::ParticleSystemUpdater;
|
||||
psu->addParticleSystem(_particleSystem.get());
|
||||
addChild(psu);
|
||||
|
||||
// add the geode to the scene graph
|
||||
osg::Geode *geode = new osg::Geode;
|
||||
geode->addDrawable(_particleSystem.get());
|
||||
addChild(geode);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user