Use Xbox 360 controller triggers and analog sticks in BGE?

hello, I have the drivers and evrything installed for my xbox controller and I’m using joystick sensors for the buttons but I can’t seem to figure out how to set up the triggers or the analog sticks.

I kept seeing a script for the sticks and downloaded the .blend for it, but they still didn’t work, is there something extra I’m supposed to do? :confused:

Sidenote: I am using a PDP AX.1 Afterglow controller if that really changes anything at all.

First of all why do you make an new thread for the same probelm (http://blenderartists.org/forum/showthread.php?t=205362) and why do you not use the forum search or google?

  1. Do you use the right driver (wireles, non wireles)?
  2. Do you checked that the controller works properly in windows?
  3. Do you calibrated the analog joysticks in the windows control panel

Here is a link how to use the Joystick axis, button, hat and singel axis http://www.tutorialsforblender3d.com/GameDoc/LogicBricks/Sensors_12.html
Here is a other thread Xbox 360 controller http://blenderartists.org/forum/showthread.php?t=205397

This shows how to assign a sensor logic brick to the buttons/joysticks on an Xbox controller- I found this on some other post on this site, but I can’t find it.

Right Thumbstick:
Up = Index 0, number 2, axis, up axis
Down = Index 0, number 2, axis, down axis
Left = Index 0, number 3, axis, left axis
Right = Index 0, number 3, axis, right axis

Left Thumbstick:
Up = Index 0, number 1, axis, up axis
Down = Index 0, number 1, axis, down axis
Left = Index 0, number 1, axis, left axis
Right = Index 0, number 1, axis, right axis

Left Trigger = Index 0, number 2, axis, right axis
Right Trigger = Index 0, number 2, axis, left axis
The problem here is that you can’t hold both triggers at once, because one will cancel the other out.

A = Index 0, Button, number 0
B = Index 0, Button, number 1
X = Index 0, Button, number 2
Y = Index 0, Button, number 3

Left Shoulder = Index 0, Button, number 4
Right Shoulder = Index 0, Button, number 5

Back = Index 0, Button, number 6
Start = Index 0, Button, number 7

Waht you can’t find? The site http://blenderartists.org/forum/showthread.php?t=146769?

Or how to assign the axis an buttons?
Blender 2.49b

  1. Open Blender 2.49b
  2. Change to the logic panel (F4)
  3. Press by the “Sensors” the “Add” button.
  4. Change “Always” to “Joystic”.
  5. For the buttons change the index and the number value.
  6. For the axis change “Button” to “Axis” and change the index, the number value and the axis. Change the threshold to 6200.
  7. Do point 3 to 6 for all axis and Button that you need.

Blender 2.55

  1. Open Blender 2.55
  2. Change in the upper menu bar from “Blender Render” to “Blender Game”
  3. Change in the upper menu bar from the “Default” to the “Game Logic” view.
  4. Press by the “Sensors” the “Add” button.
  5. Change “Always” to “Joystic”.
  6. For the buttons change the index and the number value.
  7. For the axis change “Button” to “Axis” and change the index, the number value and the axis. Change the threshold to 6200.
  8. Do point 4 to 7 for all axis and Button that you need.

I’m using 2.56 and with “Axis” it doesn’t let you change the axis # past 2 so for left & right on the Right Thumbstick I tried using “Single axis” and all I could find was one for Left on the stick (Axis #5) but nothing seemed to work for Right on the stick

I think it is a bug in Blender 2.56 (2 axis and 2 hat). In Blender 2.49b you have 8 axis and 4 hat. You should make bug report in the Blender 2.5 bug tracker.
But it should be possible to read out the analog value of the third axis with a python script.

Thanks I’ll try to find a script