i've a little problem. I am going to make a FSPShooter and I think i understand the basics of Irrlicht. But I want to make a action when i Press a Key. Then I want that this:
Code: Select all
node = smgr->addLightSceneNode(0, core::vector3df(0,0,0),
video::SColorf(1.0f, 0.6f, 0.7f, 1.0f), 600.0f);
scene::ISceneNodeAnimator* anim = 0;
anim = smgr->createFlyStraightAnimator(
core::vector3df(camera->getPosition().X,camera->getPosition().Y,camera->getPosition().Z),
core::vector3df(
(cos((camera->getRotation().X)*(3,141592654/180))*100+camera->getPosition().X),
(sin((camera->getRotation().Y)*(3,141592654/180))*100+camera->getPosition().Y),
0),250.0f,true);
node->addAnimator(anim);
anim->drop();
// attach billboard to light
node = smgr->addBillboardSceneNode(node, core::dimension2d<f32>(50, 50));
node->setMaterialFlag(video::EMF_LIGHTING, false);
node->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
node->setMaterialTexture(0, driver->getTexture("../../media/particlewhite.bmp"));
But how could I make that my problem is that the variables and other object got create in the main class and I think the event receiver must be write before that. Please Help me.
M.Irr
PS:My english is really terrible I know.