You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
cfoks
Posts: 6 Joined: Fri Jul 27, 2007 7:49 pm
Post
by cfoks » Sun Jul 29, 2007 5:50 pm
How can I use directioal lights on irrlicht or are there directional lights?
I look at the forums but I can't get any good solution....
arras
Posts: 1622 Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:
Post
by arras » Sun Jul 29, 2007 5:57 pm
Code: Select all
scene::ILightSceneNode* light = smgr->addLightSceneNode(0, core::vector3df(0,0,0), video::SColorf(255, 255, 255, 255), 1000.0f);
video::SLight ldata = light->getLightData();
ldata.Type = video::ELT_DIRECTIONAL;
ldata.Position = core::vector3df(-10,5,-5);
light->setLightData(ldata);
cfoks
Posts: 6 Joined: Fri Jul 27, 2007 7:49 pm
Post
by cfoks » Sun Jul 29, 2007 6:53 pm
I try but I cannot see anything. hmmmmm. thinking......
arras
Posts: 1622 Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:
Post
by arras » Sun Jul 29, 2007 8:50 pm
is lighting material flag of your scene nodes turned to true?
cfoks
Posts: 6 Joined: Fri Jul 27, 2007 7:49 pm
Post
by cfoks » Mon Jul 30, 2007 4:50 pm
hmmm...I enabled it to true but I got debug error....I disabled it to false and I closed the all lights and I got different result but it is not directional light because it lights all the face of objects in current scene...I think irrlicht does not have directional light like cone ...
[/img]
hybrid
Admin
Posts: 14143 Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:
Post
by hybrid » Mon Jul 30, 2007 5:17 pm
You mean spot light, not directional light. Directional light is like sunlight from a light source infinitely far away. And no, no spot lights yet.
cfoks
Posts: 6 Joined: Fri Jul 27, 2007 7:49 pm
Post
by cfoks » Mon Jul 30, 2007 5:27 pm
hmmm....OK. Then,I will try to find different solution to get spot light... continue to thinking.......