water light

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Seraph
Posts: 68
Joined: Wed Oct 21, 2009 5:58 pm

water light

Post by Seraph »

i have created a node for the water as in the tutorial
IAnimatedMesh* mesh = smgr->addHillPlaneMesh( "water",dimension2d<f32>(75,75),dimension2d<u32>(40,40), 0, 0,dimension2d<f32>(0,0),dimension2d<f32>(25,25));
ISceneNode* node = smgr->addWaterSurfaceSceneNode(mesh->getMesh(0), 3.0f, 300.0f, 30.0f);
node->setPosition(core::vector3df(1600,30,1600));
node->setMaterialTexture(0, driver->getTexture("../../media/map/stones.jpg"));
node->setMaterialTexture(1, driver->getTexture("../../media/map/water.jpg"));
node->setMaterialType(video::EMT_REFLECTION_2_LAYER);
node = smgr->addLightSceneNode(0, core::vector3df(0,0,0),video::SColorf(100.0f, 100.0f, 100.0f, 100.0f), 200.0f);
scene::ISceneNodeAnimator* anim = 0;
anim = smgr->createFlyCircleAnimator (core::vector3df(0,150,0),250.0f);
node->addAnimator(anim);
anim->drop();
but during the execution disappear the light.
This is an image:

Image

anyone know why? this code is called one time and none use "node"
Post Reply