From e41ac3c7e58f56657e133841c774afd05e2483a7 Mon Sep 17 00:00:00 2001 From: Vincent Lejeune Date: Thu, 13 Nov 2014 23:37:13 +0100 Subject: [PATCH] Fix box particules starting at 0. 0. 0. --- src/graphics/gpuparticles.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/graphics/gpuparticles.cpp b/src/graphics/gpuparticles.cpp index f3d48d00d..c9b1370c9 100644 --- a/src/graphics/gpuparticles.cpp +++ b/src/graphics/gpuparticles.cpp @@ -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,