Sun in game?
Posted: Thu Aug 21, 2014 1:20 am
I have created a sun using this code
According to the Irrlicht reference the speed is radians per milisecond. My question is how can I have it complete its rotation like once a minute or hour. How can I calculate that.
Code: Select all
ILightSceneNode* sun = smgr->addLightSceneNode(0, core::vector3df(0, 10, 0), video::SColorf(255.0f, 255.0f, 255.0f), 1000.0f);
scene::ISceneNodeAnimator* anim =
smgr->createFlyCircleAnimator(core::vector3df(1000, 10, 1000), 1000.0f, 0.0001f);
if (anim)
{
sun->addAnimator(anim);
anim->drop();
}