[Solved] Miyagi problems with mouse rel (OIS)


16-08-2012 10:40:57

Hello, I have a problem with Miyagi and the relative movement of the mouse read using OIS.

If I remove the call to MiyagiSystem.Update() everything works fine (except that there is no GUI, of course). The problem comes when miyagi is updated, because on some frames the mouse changes its absolute position but the relative value of OIS is zero.

At first, I realized this was happening because some operations based on the horizontal/X movement of the mouse (read on each frame using its relative movement) were jittering. So I added a little piece of code which on each frame displays a log indicating when the absolute mouse position has changed since last frame and when the relative position is not zero. Therefore, I would expect that whenever the absolute position changes, the relative is different than zero (except when the mouse is at the border of the window since the absolute position would remain at the maximum or minimum values but the relative should continue being changed), but very often the absolute position changes while the relative position remains zero. As I said, this only happens if I update Miyagi, so I'm guessing that Miyagi somehow resets the relative value of the mouse movement to zero.

-I'm moving at the same time the mouse cursor displayed by Miyagi and objects in my game.
-Mouse is captured by MOIS at the beginning of FrameRenderingQueued, and Miyagi is updated at the end
-My game runs as a loop of Mogre.WindowEventUtilities.MessagePump() followed by MogreRoot.RenderOneFrame()

Thank you for your help!


16-08-2012 17:13:53

miyagiSystem.InputManager.CaptureOnUpdate = false;
Otherwise the mouse will be captured twice which could mess things up.


17-08-2012 13:37:55

Thank you smiley80, that solved the problem.