Flashlight

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
Andy54
Posts: 2
Joined: Sat Jan 21, 2012 8:07 pm

Flashlight

Post by Andy54 »

Hi, I'm trying to add a flashlight light to my scene and Ive searched these forums and found this code from another post.

Code: Select all

ILightSceneNode* flashlight = smgr->addLightSceneNode();
                SLight flashlightData;
                flashlightData.Direction= camera[0]->getRotation();
                flashlightData.OuterCone= 20;
                flashlightData.Position= camera[0]->getPosition();
                flashlightData.Falloff= 30;
                flashlightData.Type= ELT_SPOT;
                flashlight->setLightData(flashlightData);
                flashlight->setRadius(100);
                flashlight->setParent(camera[0]);


However nothing shows up and was seeing if anyone would be able to help me as the post I got this from went no further after the code was posted.

Thanks
ACE247
Posts: 704
Joined: Tue Mar 16, 2010 12:31 am

Re: Flashlight

Post by ACE247 »

Have you set the materials of the meshes in your scene to receive light?
netpipe
Posts: 669
Joined: Fri Jun 06, 2008 12:50 pm
Location: Edmonton, Alberta, Canada
Contact:

Re: Flashlight

Post by netpipe »

i tried with mine too
viewtopic.php?p=306627#p306627
Live long and phosphor!
-- https://github.com/netpipe/Luna Game Engine Status 95%
Post Reply