Combine default navigation and custom input

chni

13-08-2009 13:26:58

Hi,

I use the tutorial's Mogre example application to study the properties of different meshes. In order to walk in 3d space round the mesh, the default input handling, which provides basic navigation, is very useful. I think it is provided by the OgreWindow class.

I added a keyboard listener in order to query TAB key presses, which works as expected and navigation is still possible.

But as soon as I add inputMouse.Capture(); to the FrameStarted or FrameEnded methods, mouse navigation is inhibited:
bool FrameStarted(FrameEvent evt)
{
inputKeyboard.Capture(); // no problem
inputMouse.Capture(); // inhibits navigation
return true;
}

bool FrameEnded(FrameEvent evt)
{
inputKeyboard.Capture(); // no problem
inputMouse.Capture(); // inhibits navigation
return true;
}


I think there must be a way to circumvent this. But actually I am not sure how exactly input is handled. Hence, I would be glad about an explanation.

Greetings
Chris

chni

17-08-2009 10:55:02

Furthermore, when I call inputMouse.Capture(), the mouse pointer hides. Hence, I cannot see where the mouse is on the screen.
How can I just handle a mouse click without losing the mouse pointer?

Isn't there anybody in this forum who is well versed in Mogre's input system?

I would be glad about an answer.

Greetings
Chris