Remove FIXME, add documentation itself, I found why things are like they are
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7287 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -53,14 +53,14 @@ ParticleEmitter::ParticleEmitter(ParticleKind* type, core::vector3df position,
|
||||
m_node->setParent(parent);
|
||||
}
|
||||
|
||||
// Note: the smoke system is NOT child of the kart, since bullet
|
||||
// gives the position of the wheels on the ground in world coordinates.
|
||||
// So it's easier not to move the particle system with the kart, and set
|
||||
// the position directly from the wheel coordinates.
|
||||
m_node->setPosition(position);
|
||||
material->setMaterialProperties(&(m_node->getMaterial(0)));
|
||||
//material->setMaterialProperties(&(m_node->getMaterial(0)));
|
||||
m_node->setMaterialTexture(0, material->getTexture());
|
||||
|
||||
m_node->getMaterial(0).MaterialType = video::EMT_ONETEXTURE_BLEND ;
|
||||
m_node->getMaterial(0).MaterialTypeParam = pack_texureBlendFunc(video::EBF_SRC_ALPHA, video::EBF_ONE_MINUS_SRC_ALPHA);
|
||||
m_node->getMaterial(0).ZWriteEnable = false; // disable z-buffer writes
|
||||
|
||||
switch (type->getShape())
|
||||
{
|
||||
case EMITTER_POINT:
|
||||
|
||||
@@ -1444,6 +1444,10 @@ void Kart::loadData()
|
||||
{
|
||||
try
|
||||
{
|
||||
// Note: the smoke system is NOT child of the kart, since bullet
|
||||
// gives the position of the wheels on the ground in world coordinates.
|
||||
// So it's easier not to move the particle system with the kart, and set
|
||||
// the position directly from the wheel coordinates.
|
||||
core::vector3df position(-getKartWidth()*0.35f, 0.06f, -getKartLength()*0.5f);
|
||||
m_smoke_system = new ParticleEmitter(
|
||||
new ParticleKind(file_manager->getDataFile("smoke.xml")),
|
||||
@@ -1563,7 +1567,6 @@ void Kart::updateGraphics(const Vec3& offset_xyz,
|
||||
const btWheelInfo &wi = getVehicle()->getWheelInfo(2 + m_wheel_toggle);
|
||||
Vec3 c = wi.m_raycastInfo.m_contactPointWS;
|
||||
|
||||
// FIXME: instead of constantly moving the emitter around, just make it a child of the kart node
|
||||
// FIXME: the X position is not yet always accurate.
|
||||
m_smoke_system->setPosition(core::vector3df(c.getX() + 0.06f * (m_wheel_toggle ? +1 : -1),
|
||||
c.getY(),
|
||||
|
||||
Reference in New Issue
Block a user