GPUParticles: Another snow tweak
Slightly more particles, constrained rotation direction, lower speed (vector and rotation) git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14976 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
73ba827763
commit
105761151d
@ -5,19 +5,19 @@
|
||||
|
||||
<spreading angle="3" />
|
||||
|
||||
<velocity x="-0.01"
|
||||
<velocity x="-0.005"
|
||||
y="-0.01"
|
||||
z="-0.02" />
|
||||
z="-0.005" />
|
||||
|
||||
<material file="snowflake.png" clampu="Y" clampv="Y" />
|
||||
|
||||
<!-- Amount of particles emitted per second -->
|
||||
<rate min="400"
|
||||
max="500" />
|
||||
<rate min="1000"
|
||||
max="1000" />
|
||||
|
||||
<!-- Minimal and maximal lifetime of a particle, in milliseconds. -->
|
||||
<lifetime min="9000"
|
||||
max="9000" />
|
||||
<lifetime min="10000"
|
||||
max="10000" />
|
||||
|
||||
<!-- Size of the particles -->
|
||||
<size min="0.40"
|
||||
|
@ -348,14 +348,14 @@ void ParticleSystemProxy::setEmitter(scene::IParticleEmitter* emitter)
|
||||
float *quaternions = new float[4 * count];
|
||||
for (unsigned i = 0; i < count; i++)
|
||||
{
|
||||
core::vector3df rotationdir(1., 0., 0.);
|
||||
rotationdir.rotateXYBy(os::Randomizer::frand() * 180.);
|
||||
core::vector3df rotationdir(0., 1., 0.);
|
||||
/*rotationdir.rotateXYBy(os::Randomizer::frand() * 180.);
|
||||
rotationdir.rotateYZBy(os::Randomizer::frand() * 180.);
|
||||
rotationdir.rotateXZBy(os::Randomizer::frand() * 180.);
|
||||
rotationdir.rotateXZBy(os::Randomizer::frand() * 180.);*/
|
||||
quaternions[4 * i] = rotationdir.X;
|
||||
quaternions[4 * i + 1] = rotationdir.Y;
|
||||
quaternions[4 * i + 2] = rotationdir.Z;
|
||||
quaternions[4 * i + 3] = 31.4 * os::Randomizer::frand(); // 10 rotation during lifetime at max
|
||||
quaternions[4 * i + 3] = 3.14 * 3. * ( 2. * os::Randomizer::frand() - 1.); // 3 half rotation during lifetime at max
|
||||
}
|
||||
glGenBuffers(1, &quaternionsbuffer);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, quaternionsbuffer);
|
||||
|
@ -2313,7 +2313,7 @@ void Kart::loadData(RaceManager::KartType type, bool is_animated_model)
|
||||
|
||||
m_sky_particles_emitter =
|
||||
new ParticleEmitter(track->getSkyParticles(),
|
||||
core::vector3df(0.0f, 20.0f, 100.0f),
|
||||
core::vector3df(0.0f, 30.0f, 100.0f),
|
||||
getNode());
|
||||
|
||||
// FIXME: in multiplayer mode, this will result in several instances
|
||||
|
Loading…
Reference in New Issue
Block a user