Hi Vincent,
 
I have a particle system in my scene, which starts emitting particles at 
simulation time = 0 (endless).
Then, at an arbitrary simulation time, I want the scene starting at simulation 
time 0 again.
This works well except for the particle system, because it begins now with 
another shape as in the first run, by and by getting the expected shape with 
increasing simulation time.
I tried setting several parameter combinations (life time, reset time, 
re-reading the scene before every run...) and with some combinations I had the 
problem, that the particle system started correctly out-of-the-box again, but 
the old particles did still exist. So one idea was to destroy the particles 
manually...
... which works in the way Serge suggests, but then no new particles seemed to 
be created in the following run.
 
I would be grateful for any hint!
Rudi
 
 
________________________________

Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Vincent Bourdier
Gesendet: Donnerstag, 20. März 2008 11:58
An: OpenSceneGraph Users
Betreff: Re: [osg-users] Resetting particle systems


Hi,

I don't understand why you want to destroy the particle...
A particle System works great without killing particle manually... what do you 
expect from it ?

Vincent.



2008/3/20, Serge Lages <[EMAIL PROTECTED]>: 

        Hi,
        
        The best way I found is :
        
        for (int i = 0; i < _emitter->getParticleSystem()->numParticles(); i++)
        {
             _emitter->getParticleSystem()->destroyParticle(i);
        }
        
        Yeah, it's a bit tricky, but it works... :)
        
        
        On Thu, Mar 20, 2008 at 9:12 AM, Wiedemann, Rudolf, OPS3 <[EMAIL 
PROTECTED]> wrote:
        

                Hi,
                 
                how can I reset a particle system, so when rendering the next 
frame no old particles exist any more, but only new particles are emitted?
                 
                Thanks in advance!
                Rudi

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




        -- 
        Serge Lages
        http://www.tharsis-software.com 
        _______________________________________________
        osg-users mailing list
        [email protected]
        
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
        
        


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

Reply via email to