WIP for UPBGE: Manager for XInput Controller?


Last month I started a thread asking for Python Initialization Examples, and got a really nice response : D

Since then I’ve chewed through the thread’s data to fully understand it: I’m not there yet, but I think I’ve made something that could become a useful resource for the community.

Enter: Manager for XInput Controller!

The idea is to have a single script that facilitates straightforward implementation of the XBOX ONE Controller for any and all UPBGE games on Blender Artists.

As I worked on this I came up with some requirements:

  • ) It must be super easy to setup; A single click would be best.
  • ) It must support (dis)connecting of the controller; sometimes the batteries run out or the cord falls out - this should never break the game.
  • ) It must support multiple joysticks.
  • ) It must include vibration.
  • ) ???

So far I have achieved requirements 1 and 2. Requirements 3 and 4 will probably be achieved during the next week. Further requirements are open for suggestions :slight_smile:

How to enable XBOX ONE Controller support in the scene:

  • Select an object in the scene (The controller itself gives best impression I think.) Default Option.
  • Press the “Run Script” button on the text editor. (“Autosetup.py” must be the selected text.) Default Option.
  • Mouse over the 3D view and press P to run the game.
  • Profit! : D

It’s not complete yet, but I hope you like it anyway.


EDIT_1: Oh I almost forgot to mention this: although all the buttons and gauges work, their function is not physically reflected in the scene yet. I’ll probably modify the controller model to visualize this tomorrow.

EDIT_2: Added another requirement.


XBOXONE_Controller_01.blend (1.4 MB)

1 Like

Nice work, thank you for sharing the file.