MOIS Joystick problem

Zach Griffin

04-03-2010 05:40:35

Hi guys,

We're trying to get the MOIS joystick working having come from C++. As far as I can see we're creating and registering the joystick and events as in the C++ demo but we get different results. For example using a steering wheel and pedals the OIS input diagnostic reports having the throttle on axis 3, yet in MOIS it comes up as axis 2. The brake in OIS comes up as axis 2 but in MOIS it comes up as axis 1. It's not such a big problem but the clutch which comes up in OIS as axis 4 doesn't come up at all in MOIS, with the axis count coming up as 3 instead of 4. Is there a bug somewhere I haven't found? Below is the code we're using:

InputJoystick = (MOIS.JoyStick)InputManager.CreateInputObject(MOIS.Type.OISJoyStick, true);

InputJoystick.AxisMoved += new JoyStickListener.AxisMovedHandler(InputJoystick_AxisMoved);

Console.WriteLine("Axis: " + axis.ToString() + arg.state.GetAxis(axis).abs);


And the C++ code from the OIS input diag demo:

g_joys[i] = (JoyStick*)g_InputManager->createInputObject( OISJoyStick, true );
g_joys[i]->setEventCallback( &handler );


Any help is much appreciated!