Fix box particules starting at 0. 0. 0.
This commit is contained in:
parent
5c32aa8baa
commit
e41ac3c7e5
@ -162,6 +162,8 @@ void ParticleSystemProxy::generateParticlesFromBoxEmitter(scene::IParticleBoxEmi
|
|||||||
ParticleParams[i].PositionZ = emitter->getBox().MinEdge.Z + os::Randomizer::frand() * extent.Z;
|
ParticleParams[i].PositionZ = emitter->getBox().MinEdge.Z + os::Randomizer::frand() * extent.Z;
|
||||||
// Initial lifetime is random
|
// Initial lifetime is random
|
||||||
InitialValues[i].Lifetime = os::Randomizer::frand();
|
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));
|
memcpy(&(InitialValues[i].PositionX), &(ParticleParams[i].PositionX), 3 * sizeof(float));
|
||||||
generateLifetimeSizeDirection(emitter, ParticleParams[i].Lifetime, ParticleParams[i].Size,
|
generateLifetimeSizeDirection(emitter, ParticleParams[i].Lifetime, ParticleParams[i].Size,
|
||||||
|
Loading…
Reference in New Issue
Block a user