I'm trying to select a scene node using mouse. In theory it's fairly simple, a line from where the mouse pointer going into the screen, see what node it hits and get that. The problem is that I always get the camera node regardless of where I click.
I thought about moving the starting point a short distance into the screen, but that didn't work very well.
Code: Select all
scene::ISceneNode* node = mgr->getSceneCollisionManager()->getSceneNodeFromRayBB(mgr->getSceneCollisionManager()->getRayFromScreenCoordinates(core::position2di(state.Position.X, state.Position.Y)), -1, false);
Is the problem with that line or my camera class? I've based it on the FPS camera that comes build in with irrlicht, just switched some controls around.