Code: Select all
Character = pManager->getSceneManager()->addAnimatedMeshSceneNode(pManager->getSceneManager()->getMesh("../../media/sydney.md2"));
Character->setMaterialFlag(video::EMF_LIGHTING, false);
Character->setFrameLoop(160, 183);
Character->setAnimationSpeed(40);
Character->setMD2Animation(scene::EMAT_STAND);
Character->setRotation(core::vector3df(0,180.0f,0));
Character->setMaterialTexture(0,pManager->getDriver()->getTexture("/media/sydney.bmp"));
Character->setPosition(core::vector3df(108,140,-140)) ;
Code: Select all
// add camera
scene::ICameraSceneNode* camera = pManager->getSceneManager()->addCameraSceneNode();
camera->setPosition(core::vector3df(120,140,-180));
camera->setTarget(core::vector3df(200,170,140));
camera->setFarValue(1200.0f);
i mean when i determine the model position,how to determine the relevant parameters of the camera?