marc_antoine
12-02-2009 16:05:49
march/09/2007
free camera issue solved, but target camera is still not working well...
hi everyone,
i will start xplainning what i have and then what iwant to achieve.
1.- I have a scene in max,a very simple test scene where i have a animated target camera, the target camera first zooms out from a box and then rotates 360 degrees, and then then zooms in the box, i can see the animation in the Ofusion viewport so then i exported the scene and the animation,
2.- in my program i have th e following code:
and then i load the scene:
then i have everything ready just to click the box so the animation starts, (i have tested by clicking the box, and then an animated box moves, so the animation code works) but the camera animation doesn't work, i think that if i subtitute my sceneManager witht he sceneManager from oFusion, it should work, but it doesn't i even get the camera from the oSceneManager like this:
i don't any error, and the camera starts in another place different than max or the coordinates i set, also the code i have to rotate and move the camera backward and forward and so, stops working like if i'm moving another camera.. so what should i do, also i would like to start the scene in the same place where my camer is placed in max...
help!! mybe this is an stupid question..but help this newbie pls...
free camera issue solved, but target camera is still not working well...
hi everyone,
i will start xplainning what i have and then what iwant to achieve.
1.- I have a scene in max,a very simple test scene where i have a animated target camera, the target camera first zooms out from a box and then rotates 360 degrees, and then then zooms in the box, i can see the animation in the Ofusion viewport so then i exported the scene and the animation,
2.- in my program i have th e following code:
mSceneMgr = mRoot->createSceneManager(ST_GENERIC,StringUtil::BLANK);
mCamera = mSceneMgr->createCamera("IntroCamera");
mCamera->setPosition(Vector3(0,60,0));
// Look back along +Z
mCamera->lookAt(Vector3(0,60,0));
mCamera->setNearClipDistance(5);
mViewport = mRoot->getAutoCreatedWindow()->addViewport(mCamera);
mViewport->setBackgroundColour(ColourValue(1.0, 1.0, 1.0));
and then i load the scene:
OSMScene oScene(mSceneMgr,GameManager::getRenderWindow());
oScene.initialise(nameOfTheOSMFile);//("brazo.osm");//
oScene.createScene();
mSceneMgr= oScene.getSceneManager();
mSceneMgr->setSkyBox(true, "Examples/CloudyNoonSkyBox");
then i have everything ready just to click the box so the animation starts, (i have tested by clicking the box, and then an animated box moves, so the animation code works) but the camera animation doesn't work, i think that if i subtitute my sceneManager witht he sceneManager from oFusion, it should work, but it doesn't i even get the camera from the oSceneManager like this:
mCamera=oScene.getSceneManager()->getCamera("Camera01");
i don't any error, and the camera starts in another place different than max or the coordinates i set, also the code i have to rotate and move the camera backward and forward and so, stops working like if i'm moving another camera.. so what should i do, also i would like to start the scene in the same place where my camer is placed in max...
help!! mybe this is an stupid question..but help this newbie pls...