Code: Select all
camera[0] = smgr->addCameraSceneNodeMaya();
camera[0]->setPosition(core::vector3df(0,200,200));
camera[0]->setTarget(core::vector3df(0,0,0));
Code: Select all
ICameraSceneNode* camera=smgr->getActiveCamera();
vector3df totargetvector = camera->getPosition() - camera->getTarget();
totargetvector.normalize();
vector3df crossvector = totargetvector.crossProduct(camera->getUpVector());
vector3df strafevector = crossvector.normalize();
//camera->setPosition(camera->getPosition() - strafevector * translateSpeed);
camera->setTarget(camera->getTarget() - strafevector * translateSpeed);
camera->updateAbsolutePosition();
who can help me,thanks!