Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 28, 2019, 5:00:24 PM (6 years ago)
Author:
tkuonen
Message:

Repair MouseAPI

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/MouseAPI_FS19/src/modules/MouseAPI/mouseapi.cc

    r12253 r12263  
    1212     if(InputManager::exists())
    1313     {
    14         cam = CameraManager::getInstance().getActiveCamera()->getOgreCamera();
    15         state = InputManager::getInstance().createInputState("MouseAPI");
     14        //cam = CameraManager::getInstance().getActiveCamera()->getOgreCamera();
     15        state = InputManager::getInstance().createInputState("MouseAPI",true,true,99);
    1616        state->setMouseExclusive(false);//does this work
    1717        state->setMouseHandler(this);
     
    3838void MouseAPI::buttonPressed(MouseButtonCode::ByEnum button)
    3939{
     40    cam = CameraManager::getInstance().getActiveCamera()->getOgreCamera();
    4041    Ogre::Viewport *vp = GraphicsManager::getInstance().getViewport();
    4142    Ogre::Ray ray = cam->getCameraToViewportRay(mousePos.x/((float)vp->getActualWidth()),mousePos.y/((float)vp->getActualHeight()));
Note: See TracChangeset for help on using the changeset viewer.