Code: Select all
//Add the billboard for the Moon.
scene::ISceneNode* moon = smgr->addBillboardSceneNode(0, core::dimension2d<f32>(150, 150),core::vector3df(0,0,0));
moon->setMaterialFlag(video::EMF_LIGHTING, false);
moon->setMaterialTexture(0, driver->getTexture("../object/moon.jpg"));
//Create a FlyCircle Animator to revolve it.
scene::ISceneNodeAnimator* moonorbit = 0;
moonorbit = smgr->createFlyCircleAnimator(vector3df(0,0,0), 1000, .0005, vector3df(0, 0, 1));
//Attach that to the moon.
moon->addAnimator(moonorbit);
moonorbit->drop();