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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user