nice 2d explosions generator

A forum to store posts deemed exceptionally wise and useful
Clash
Posts: 80
Joined: Thu Apr 19, 2007 4:20 pm

Post by Clash »

Code: Select all

    scene::ISceneManager* smgr = device->getSceneManager();

    scene::IBillboardSceneNode * bill = smgr->addBillboardSceneNode();
    bill->setPosition(core::vector3df(0, 0, 3));
    bill->setMaterialTexture(0, driver->getTexture("images/explosion_1.png"));
    bill->setMaterialFlag(video::EMF_LIGHTING, false);
    bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
    bill->setSize(core::dimension2d<f32>(250.0f, 250.0f));
    bill->setScale(core::vector3df(1, 1, 1));
Seting Scale to 1x1x1, means it's normal size, correct? setSize is the size of the image, right? I did smgr->drawAll() on the main loop, but nothing was shown, what am I doing wrong? I am a complete newb to this 3D stuff...

My game is fully 2D, do I need to have a scene::ICameraSceneNode* camera to use this billboard and lighting stuff?

Thanks!
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You always need a camera.
Clash
Posts: 80
Joined: Thu Apr 19, 2007 4:20 pm

Post by Clash »

hybrid wrote:You always need a camera.
I have a camera, but I made one myself, very simple, as it's for a 2D game...
Anyways, adding scene::ICameraSceneNode* camera = smgr->addCameraSceneNodeFPS(); still does not make the billboard appear and it messes my mouse, can you please be a little more descriptive? There are no tutorials, I have looked the API and searched the forums (most already have their billboard showing, apparently I'm super dumb)

Thanks
Post Reply