Flycircleanimator?
Posted: Sun Mar 04, 2007 4:09 am
I'm having some trouble with changing the axis of the flycircle animator. It seemed like from reading the documentation that you could be able to change it, but the closest I can get is a tilted circle- I would like the axis to be perfectly vertical.
I am trying to get it to rotate about the X or Z axis, but the best I can do is with a 1 for Y and Z for a tilted circle. partial numbers like 1.1, etc make the circle very tall but not any more straight. A number for X or Z with a 0 for the Y simply makes the moon go straight up and down. Very confusing.
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();