Tuning of skid smoke. Particle is more transparent and has slight cyan shade.

More particles but smaller, with different life times. And trying to get them
to fade, but that is not working (trying to get them to become red as test,
final version should just fade transparency).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3593 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
mbjornstk 2009-06-04 20:16:38 +00:00
parent bab247c3f0
commit 3cc2aad628
2 changed files with 8 additions and 8 deletions

View File

@ -28,7 +28,7 @@
Smoke::Smoke(Kart* kart) : m_kart(kart)
{
const float particle_size = 0.5f;
const float particle_size = 0.33f;
// Left wheel
m_node_l = irr_driver->addParticleNode();
m_node_l->setParent(m_kart->getNode());
@ -41,14 +41,14 @@ Smoke::Smoke(Kart* kart) : m_kart(kart)
5, 10,
video::SColor(255,0,0,0),
video::SColor(255,255,255,255),
400, 400,
300, 500,
20 // max angle
);
m_emitter_l->setMinStartSize(core::dimension2df(particle_size/1.5f, particle_size/1.5f));
m_emitter_l->setMaxStartSize(core::dimension2df(particle_size*1.5f, particle_size*1.5f));
m_node_l->setEmitter(m_emitter_l); // this grabs the emitter
scene::IParticleAffector *afl = m_node_l->createFadeOutParticleAffector();
scene::IParticleFadeOutAffector *afl = m_node_l->createFadeOutParticleAffector(video::SColor(0, 255, 0, 0), 500);
m_node_l->addAffector(afl);
afl->drop();
@ -61,17 +61,17 @@ Smoke::Smoke(Kart* kart) : m_kart(kart)
m_node_r->setMaterialTexture(0, mr->getTexture());
m_emitter_r = m_node_r->createPointEmitter(core::vector3df(0, 0, 0), // velocity in m/ms
5, 10,
5, 10,
video::SColor(255,0,0,0),
video::SColor(255,255,255,255),
400, 400,
300, 500,
20 // max angle
);
);
m_emitter_r->setMinStartSize(core::dimension2df(particle_size/1.5f, particle_size/1.5f));
m_emitter_r->setMaxStartSize(core::dimension2df(particle_size*1.5f, particle_size*1.5f));
m_node_r->setEmitter(m_emitter_r); // this grabs the emitter
scene::IParticleAffector *afr = m_node_r->createFadeOutParticleAffector();
scene::IParticleFadeOutAffector *afr = m_node_r->createFadeOutParticleAffector(video::SColor(255, 255, 0, 0), 500);
m_node_r->addAffector(afr);
afr->drop();
} // KartParticleSystem

View File

@ -1065,7 +1065,7 @@ void Kart::updateGraphics(const Vec3& off_xyz, const Vec3& off_hpr)
if(m_smoke_system)
{
float f = fabsf(m_controls.m_steer) > 0.8 ? 50.0f : 0.0f;
float f = fabsf(m_controls.m_steer) > 0.8 ? 250.0f : 0.0f;
m_smoke_system->setCreationRate((m_skidding-1)*f);
}
if(m_nitro)