Fix box particules starting at 0. 0. 0.

This commit is contained in:
Vincent Lejeune 2014-11-13 23:37:13 +01:00
parent 5c32aa8baa
commit e41ac3c7e5

View File

@ -162,6 +162,8 @@ void ParticleSystemProxy::generateParticlesFromBoxEmitter(scene::IParticleBoxEmi
ParticleParams[i].PositionZ = emitter->getBox().MinEdge.Z + os::Randomizer::frand() * extent.Z;
// Initial lifetime is random
InitialValues[i].Lifetime = os::Randomizer::frand();
if (!m_randomize_initial_y)
InitialValues[i].Lifetime += 1.;
memcpy(&(InitialValues[i].PositionX), &(ParticleParams[i].PositionX), 3 * sizeof(float));
generateLifetimeSizeDirection(emitter, ParticleParams[i].Lifetime, ParticleParams[i].Size,