is there another setting that I need to enable?
using fire.bmp as the texture.
Code: Select all
virtual void createSceneNodes()
{
IGE_Object::createSceneNodes();
vector3df scale = getAbsoluteScale() + getScaleOffset();
vector3df pos = getAbsolutePosition();
vector3df rot = getAbsoluteRotation();
m_Box = aabbox3d<f32>(-getAbsoluteScale().X, -getAbsoluteScale().Y, -getAbsoluteScale().Z, getAbsoluteScale().X, getAbsoluteScale().Y, getAbsoluteScale().Z);
m_Ps = getSmgr()->addParticleSystemSceneNode(false, 0, getId(), pos, rot, scale);
m_Ps->setMaterialFlag(E_MATERIAL_FLAG::EMF_LIGHTING, getLevel()->getUseLight());
m_Ps->setMaterialFlag(E_MATERIAL_FLAG::EMF_FOG_ENABLE, getLevel()->getUseFog());
m_Em = m_Ps->createBoxEmitter(
m_Box,
m_Direction,
m_MinParticlesPerSecond, m_MaxParticlesPerSecond,
m_MinStartColor, m_MaxStartColor,
m_LifeTimeMin, m_LifeTimeMax,
m_MaxAngleDegrees,
m_MinStartSize, m_MaxStartSize);
m_Ps->setEmitter(m_Em);
m_Em->drop();
m_Paf = m_Ps->createFadeOutParticleAffector();
m_Ps->addAffector(m_Paf);
m_Paf->drop();
m_Ps->setMaterialFlag(EMF_LIGHTING, getLevel()->getUseLight());
m_Ps->setMaterialFlag(EMF_FOG_ENABLE, getLevel()->getUseFog());
m_Ps->setMaterialFlag(EMF_ZWRITE_ENABLE, false);
m_Ps->setMaterialTexture(0, getDriver()->getTexture(MEDIAPATH(getTexture0Filename())));
m_Ps->setMaterialType(EMT_TRANSPARENT_ADD_COLOR);
}