Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

Reducing Joystick jitter in GameControlPlus library

$
0
0

Have been using Quark's AWESOME GameControlPlus library to access a Logitech Extreme 3D Pro Stick. The input is a bit jittery and I'm wondering how it might be smoothed out a bit.

Below is the code where I read the stick:

void getUserInput() {

JOYX = map(stick.getSlider("X").getValue(), -1, 1, 0, width); JOYY = map(stick.getSlider("Y").getValue(), -1, 1, 0, height); cartX = map(stick.getSlider("X").getValue(), -1, 1, -90, 90); cartY = map(stick.getSlider("Y").getValue(), -1, 1, 90, -90); buttPress = stick.getButton("But1").pressed(); }

PS - did try to use markdown for the code - but it still eludes me!


Viewing all articles
Browse latest Browse all 2896

Trending Articles