Hi,

I am 4 years late but maybe it will help someone else.
I had a problem wich was similar to yours: i wanted to hide/show a node who had 
a particleSystemUpdater attached, and the accumulation problem came to me there.

So that's what i did to get around:
We should not hide/show the node (or ParticleSystemUpdater) attached to the 
ParticleSystem, but the Emitter. In my case, it was a ModularEmitter but it's 
the same.
And then you have 2 solutions, both work:

Code:

//hide or show the modular emitter
emitter->setNodeMask(0 or 1);





Code:

//set the counter of the emitter to 0. It's a little trick but it works.
//if you do this, remember that you have to have to set back the real counter 
of the emitter when you want to show again your particles
counter = new osgParticle::RandomRateCounter;
counter->setRateRange( osgParticle::rangef(0,0) );
emitter->setCounter(counter);




This solution might not be the best, but that's the only one i found for now.

Cheers,
Flavien

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=55149#55149





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to