1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
...
// ajoute des ressources au moteur
ResourceGroupManager::getSingleton().addResourceLocation("C:/UNIVERSITE/A-VOLUTE/e3/e3Demo/data/pak0.zip", "Zip","General");
ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
// load le BSP
mSceneMgr->setWorldGeometry("maps/q3dm17.bsp");
// rotation cam, quake à un repère différent
// modify camera for close work
mCamera->setNearClipDistance(4);
mCamera->setFarClipDistance(4000);
// Also change position, and set Quake-type orientation
// Get random player start point
ViewPoint vp = mSceneMgr->getSuggestedViewpoint(true);
mCamera->setPosition(vp.position);
mCamera->pitch(Degree(90)); // Quake uses X/Y horizon, Z up
mCamera->rotate(vp.orientation);
// Don't yaw along variable axis, causes leaning
mCamera->setFixedYawAxis(true, Vector3::UNIT_Z);
... |
Partager