I have a billboard hovering over an item in space. I want to click on the billboard, and the camera zooms in on the item. The camera zoom and the item are fine, the problem lies in here:
Code: Select all
Ogre::Ray mouseRay = mCamera->getCameraToViewportRay(mousePos.d_x/float(arg.state.width), mousePos.d_y/float(arg.state.height));
mRaySceneQuery = mCamera->getSceneManager()->createRayQuery(Ray());
mRaySceneQuery->setSortByDistance(true);
if (currSceneType == SCENE_SSVIEW) mRaySceneQuery->setQueryMask(SUN_MASK | SC_MASK | PLANET_MASK | PLANET_BTN_MASK | Ogre::SceneManager::FX_TYPE_MASK);
//I have tried setQueryTypeMask, but that makes both the keyboard and the mouse become unresponsive.
mRaySceneQuery->setRay(mouseRay);
RaySceneQueryResult result = mRaySceneQuery->execute();
rayHitData myHit = RaycastFromPoint(mRaySceneQuery, mouseRay);Also note: for some reason, Ogre::SceneManager::FX_TYPE_MASK; always comes back as about 536 billion. The other enums are all sensible uint32s, but that one is wild.

