0

Just a simple question regarding the procontroll library on processing. I am trying to connect a joystick to a simple game. it consist of a vehicle that goes up and down. The downward motion is represented by gravity. the upward motion I wanted it to be represented by throttle control. I have use procontroll to connect my joystick (black widow speedlink) to processing.what I noticed is that the slider (throttle control) motion has to be maximum or minimum for the object on processing to move.So speed doesn't change as I throttle up or down. Anyone up to help or advise me on any other api I can use to code for joystick throttle control.thanks

https://www.google.co.uk/search?q=black+widow+speedlink+Jinput&rlz=1C1ASUT_en-GBGB469GB469&oq=black+w&aqs=chrome.0.69i59j69i57j69i60l3j0.3912j0j4&sourceid=chrome&espv=210&es_sm=93&ie=UTF-8#q=black+widow+speedlink

1 Answers1

0

Did you configure a Minimum Time Intervall?

            tmrPoll = new Timer(25);
            tmrPoll.Elapsed += new ElapsedEventHandler(tmrPoll_Elapsed);
            tmrPoll.Start();

and afterwards under the tmrPoll_elapsed:

        jst.UpdateStatus();//jst= new joystick
        ax[0] = jst.AxisC;            
        ax[1] = jst.AxisA;
        ax[2] = jst.AxisB;
        ax[3] = jst.AxisD;
        ax[4] = jst.AxisE;
        ax[5] = jst.AxisF;
ephraim
  • 379
  • 1
  • 3
  • 15