Flashlight
Posted: Fri Apr 20, 2012 4:08 pm
Hi, I'm trying to add a flashlight light to my scene and Ive searched these forums and found this code from another post.
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
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