GLBasic forum

Main forum => GLBasic - en => Topic started by: erico on 2014-Jul-28

Title: Joystick and Joypad strange results
Post by: erico on 2014-Jul-28
I´m pooling GETJOYX(0) to get info on either the pad or the analog joystick.

I get a variation 0-1 when using analog.
I don´t get 1 when using the joypad but somewhere about 0.993.

I calibrated the joystick, it is a logitech dual action. I still get the same results.

There is no big problem in game as I just added an IF to bring 1 when over 0.990, so I´m fine but I wonder and am curious why I´m not getting the full value in first place, could it be a bug? Could it be my system and control? Can someone check?
Title: Re: Joystick and Joypad strange results
Post by: MrTAToad on 2014-Jul-28
It is the problem with digital joysticks - you need to take into account a dead-zone area unfortunately.
Title: Re: Joystick and Joypad strange results
Post by: erico on 2014-Jul-29
Ok, thanks.

So here I think It would be safer if I increase the threshold a bit more right?
Title: Re: Joystick and Joypad strange results
Post by: MrTAToad on 2014-Jul-30
Yes, it does sound like it needs increasing.
Title: Re: Joystick and Joypad strange results
Post by: spacefractal on 2014-Aug-04
some digial pads can been threated as a analog controllers for the system and by drivers used. So you should do something deadzone like checking like 0.6> rather doing a 1.0 directly (if you uses digital movement of course).