So, I'm creating a program to simulate what it would be like to jump on the moon and a few of the planets to be projected onto a bigscreen in front of a few hundred kids... intended to get them interested in physics...
My problem is, I have my scene set up so that a few seconds after landing on the moon the sun rises up over the horizon and casts light over the surface. Until then, I want to have a flashlight to make it seem a bit more realistic... Sadly, I have no earthly idea how to make the flashlight effect.
Well, almost no idea... while typing this I thought of something that might work... but it's a long shot.
Could I possibly render a cylinder around the light source? Even if this would work... if there are any better ways to do this, please explain.
Flashlight
Code: Select all
ILightSceneNode* flashlight;
flashlight= smgr->addLightSceneNode();
SLight flashlightData;
flashlightData.Direction= camera->getRotation();
flashlightData.OuterCone= 20;
flashlightData.Position= camera->getPosition();
flashlightData.Falloff= 30;
flashlightData.Type= ELT_SPOT;
flashlight->setLightData(flashlightData);
flashlight->setRadius(20);
flashlight->setParent(camera);