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