Changeset 511 for code/branches/FICN/src
- Timestamp:
- Dec 13, 2007, 2:49:26 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/orxonox/orxonox.cc
r510 r511 130 130 if (mouseX<0) 131 131 steering->rotateLeft(-mouseX*rotate); 132 mouseY = 0; 133 mouseX = 0; 132 134 moved = false; 133 135 } … … 148 150 bool mouseMoved(const OIS::MouseEvent &e) 149 151 { 150 mouseX = e.state.X.rel;151 mouseY = e.state.Y.rel;152 mouseX += e.state.X.rel; 153 mouseY += e.state.Y.rel; 152 154 if(mouseX>maxMouseX) maxMouseX = mouseX; 153 155 if(mouseX<minMouseX) minMouseX = mouseX; … … 361 363 362 364 Camera *cam = mgr->createCamera("Camera"); 363 cam->setPosition(Vector3(0,0, +250));365 cam->setPosition(Vector3(0,0,-250)); 364 366 cam->lookAt(Vector3(0,0,0)); 365 367 Viewport *vp = ogre_->getRoot()->getAutoCreatedWindow()->addViewport(cam); … … 434 436 void Orxonox::startRenderLoop() 435 437 { 438 // this is a hack!!! 439 // the call to reset the mouse clipping size should probably be somewhere 440 // else, however this works for the moment. 441 unsigned int width, height, depth; 442 int left, top; 443 ogre_->getRoot()->getAutoCreatedWindow()->getMetrics(width, height, depth, left, top); 444 445 const OIS::MouseState &ms = mouse_->getMouseState(); 446 ms.width = width; 447 ms.height = height; 448 436 449 ogre_->getRoot()->startRendering(); 437 450 } 438 451 } 439 440
Note: See TracChangeset
for help on using the changeset viewer.