From Farshid Lashkari, "I noticed that sometimes when a particle emitter is re-enabled, a few

particles will appear at the location it was disabled at. The problem
is that the previous local to world matrix is not being updated while
it is disabled. I modified the particle processor so that it will set
the dirty flag for the previous local to world matrix when the
processor is skipped for a frame, since the value will no longer be
relevant."
This commit is contained in:
Robert Osfield
2006-03-08 15:26:39 +00:00
parent 02f5681180
commit c69c9d2070

View File

@@ -108,6 +108,11 @@ void osgParticle::ParticleProcessor::traverse(osg::NodeVisitor& nv)
// do some process (unimplemented in this base class)
process(t - _t0);
} else {
//The values of _previous_wtl_matrix and _previous_ltw_matrix will be invalid
//since processing was skipped for this frame
_first_ltw_compute = true;
_first_wtl_compute = true;
}
}