I have already successfully integrated Irrlicht into Qt5, and added an FPS camera to my scene (with the sceneManager->addCameraSceneNodeFPS() method).
I can also move the camera using the arrow keys, but I simply cannot get mouse movement to work.
I followed the steps here:
http://irrlicht.sourceforge.net/forum/v ... 6&p=271024
which contains this code snipped:
Code: Select all
void QIrrlichtWidget::mouseMoveEvent( QMouseEvent* event )
{
irr::SEvent irrEvent;
irrEvent.EventType = irr::EET_MOUSE_INPUT_EVENT;
if ( device != 0 )
{
irrEvent.MouseInput.Event = irr::EMIE_MOUSE_MOVED;
irrEvent.MouseInput.X = event->x();
irrEvent.MouseInput.Y = event->y();
irrEvent.MouseInput.Wheel = 0.0f; // Zero is better than undefined
qDebug() << "Mouse event: " << event->x() << "/" << event->y() << endl;
device->postEventFromUser( irrEvent );
}
event->ignore();
}
However, the mouse is not captured by the window, and does not stay centered like it does in the Movement irrlicht sample.
Is there any reason why the fps camera would ignore mouse inputs?