code we use for the lights
Code: Select all
mLevelNode->setMaterialFlag( video::EMF_LIGHTING, true );
mLevelNode->setMaterialType( video::EMT_LIGHTMAP_LIGHTING );
mLevelNode->setMaterialFlag( video::EMF_NORMALIZE_NORMALS, true);
scene::ILightSceneNode* light = mSmgr->addLightSceneNode( 0 );
irr::video::SLight l;
l.AmbientColor = video::SColorf(1.0f, 0.0f, 0.0f);
l.DiffuseColor = video::SColorf(0.6f, 0.6f, 0.6f);
l.SpecularColor = video::SColorf(0.0f, 0.0f, 0.0f);
l.Radius = mLights[0].power;
l.Type = video::ELT_POINT;
l.Direction = core::vector3df( 0.0f,
-1.0f,
0.0f );
l.InnerCone = (float)mLights[0].innercone;
l.OuterCone = (float)mLights[0].outercone;
Here are some screenshots
http://stefans.damnserver.com/screen1.jpg
http://stefans.damnserver.com/screen2.jpg
Here you can see how the light fligh around in a cirlce effect the walls very strange.
Anyone has any idea how to fix or another way to implement dynamic lights with Irrlicht.
thx[/img]