Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I have the Left Analog Stick programmed and accepting input (moving a character around). (getCompassDir() returns the values of the cardinal directions and NONE means the stick isn't touched):

// Left Analog Stick
public int getLeftAnalogStickDir() {
    // return the (x,y) analog stick compass direction
    if ((xAxisIdx == -1) || (yAxisIdx == -1)) {
        System.out.println("(x,y) axis data unavailable");
        return NONE;
    } else
        return getCompassDir(xAxisIdx, yAxisIdx);
}

This works perfectly. Now when trying to program the Right Analog Stick of the controller, I use the same code as above, but instead, I replaced xAxisIdx and yAxisIdx with zAxisIdx and rzAxisIdx (the x, y value of the right stick). The problem is that its not reading the input like the left Analog Stick.

Does anyone know why the right analog stick isnt working? I followed the tutorial from this book:

Pro Java 6 3D Game Development: Java 3D, JOGL, JInput and JOAL APIs

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.