Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 511


Ignore:
Timestamp:
Dec 13, 2007, 2:49:26 PM (17 years ago)
Author:
nicolape
Message:

Reto added steering bug fix

Location:
code/branches/FICN
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/bin/levels/sample.oxw

    r510 r511  
    2020                <Skybox src="Orxonox/BlueStarSkyBox" />
    2121                               
     22
     23
     24                               
     25                               
    2226        </world>
    2327
  • code/branches/FICN/src/orxonox/orxonox.cc

    r510 r511  
    130130          if (mouseX<0)
    131131            steering->rotateLeft(-mouseX*rotate);
     132          mouseY = 0;
     133          mouseX = 0;
    132134          moved = false;
    133135        }
     
    148150      bool mouseMoved(const OIS::MouseEvent &e)
    149151      {
    150         mouseX = e.state.X.rel;
    151         mouseY = e.state.Y.rel;
     152        mouseX += e.state.X.rel;
     153        mouseY += e.state.Y.rel;
    152154        if(mouseX>maxMouseX) maxMouseX = mouseX;
    153155        if(mouseX<minMouseX) minMouseX = mouseX;
     
    361363   
    362364    Camera *cam = mgr->createCamera("Camera");
    363     cam->setPosition(Vector3(0,0,+250));
     365    cam->setPosition(Vector3(0,0,-250));
    364366    cam->lookAt(Vector3(0,0,0));
    365367    Viewport *vp = ogre_->getRoot()->getAutoCreatedWindow()->addViewport(cam);
     
    434436  void Orxonox::startRenderLoop()
    435437  {
     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
    436449    ogre_->getRoot()->startRendering();
    437450  }
    438451}
    439 
    440 
Note: See TracChangeset for help on using the changeset viewer.