Changeset 12263 for code/branches/MouseAPI_FS19/src/modules/MouseAPI
- Timestamp:
- Mar 28, 2019, 5:00:24 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/MouseAPI_FS19/src/modules/MouseAPI/mouseapi.cc
r12253 r12263 12 12 if(InputManager::exists()) 13 13 { 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); 16 16 state->setMouseExclusive(false);//does this work 17 17 state->setMouseHandler(this); … … 38 38 void MouseAPI::buttonPressed(MouseButtonCode::ByEnum button) 39 39 { 40 cam = CameraManager::getInstance().getActiveCamera()->getOgreCamera(); 40 41 Ogre::Viewport *vp = GraphicsManager::getInstance().getViewport(); 41 42 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.