Input from an Xbox 360 controller for windows

Hi, I am wondering how to get input from an xbox 360 controller for windows, including vibration feedback. Do I need to use python, or is it possible with logic bricks, or is it even possible?


Never mind. I found the joystick sensor, but I don’t know how to do vibration or analog stick force (move slower when only pressed a little)

For ‘analog stick force’ change the Axis Thresh-hold to about 3000.
Heres a little demo. (Without FPS)


Joystick.blend (382 KB)

That’s where I’m having trouble; the force threshold doesn’t work with the controller :frowning:

Oh. Have you played around much with the axis threshold a lot? e.g. 100, 500, 1000, 1500, 2500

Actually, I think it is working, I just need a way to make the motion or force match the amount of force in the analog stick. How can I do that?

That’s the whole point of Axis Thresh-hold!
Just play around with the movement speed and the thresh-hold. Works for me…

I think the max is around 32000. That’s pushed all the way to the end. I haven’t found a way to do one to one adjustments so I use multiple logic bricks. Probably a better way, but here is an example of how I do it.

  1. Threshold - 500, set velocity to 2 or whatever
  2. Threshold - 8000, set velocity to 4
  3. Threshold - 20000, set velocity to 6

That way the character moves at different speed “levels” depending on how far you are holding the analog.

Or make a python script that does maths to set the velocity more smoothly.

It’s incredibly easy to do in python.
Pick your max speed let’s say, 100.

max speed/max push (of analogue stick) = speed rate

speed rate * current push = actual speed

Done :slight_smile:

Oh, okay, now I understand. But does anyone by any chance have a script for smoother/more precise movements?