As with all custom scene nodes, all you have to do is create a new instance, make it a child of the root scene node and drop it.
Code: Select all
ISceneNode* fire = new CFireSceneNode(
root, //Parent
smgr, //Scene Manager
device->getTimer(), //ITimer
"cool.tga", //Fadeout texture
SColor(255, 255, 128, 0), //Starting color
2, //Fadeout color (2 - red, 1 - green, 0 - blue)
0.95f, //Fadeout rate (0.0f - 1.0f -> the higher, the less the
//color fades into the fadeout color)
64, //Texture X size
64, //Texture Y size
30, //Width
70, //Height
20, //Update speed
-1, //id
vector3df(0.0f, 20.0f, 0.0f), //Position
vector3df(0.0f, 0.0f, 0.0f) //Rotation
);
fire->drop();
u32 deltaTime = timer->getTime() - prevTime;
Link to the code is in my sig