Mouse movement bug


25-07-2009 21:06:44

This code was lagging for me:

mGUI->injectMouseMove( arg.getArgs() ); // Directly passing OIS::MouseEvent

I fixed it by using the overloaded version:

mGUI->injectMouseMove( arg.getArgs().state.X.abs, arg.getArgs().state.Y.abs, arg.getArgs().state.Z.abs ); // Passing abs. x, y, z


28-07-2009 01:14:09

Most simple variant is: mGUI->injectMouseMove( arg ); but all that it actually do is bool injectMouseMove( const OIS::MouseEvent& _arg) { return injectMouseMove(_arg.state.X.abs, _arg.state.Y.abs, _arg.state.Z.abs); } You don't need getArgs.


28-07-2009 11:34:14

This arg is my own event class, so arg.getArgs() returns const OIS::MouseEvent&. This is very strange, because the second version where I pass only the coords fixes the mouse cursor "hopping". But maybe I changed sth at the same time which had indirect consequences for the gui. I just thought maybe the first version uses the relative coords or sth.