Dennis Haupt offers a .blend file that shows how to read our a PS4 controller using Python.
This Blend File is a example on how to setup a Playstation 4 Controller with only one Python Script.
The Script controls all Buttons, the Hat and the Analog Stick input, also the sensibility of the Analog Stick will be recognized.
- Left Analog-Stick or Hat = Moves the Ball
- Right Analog-Stick = Camera Control
- X-Button = Jump (Hold the X-Button for slower falling)
- R1-Button = Turbo
If no Ps4-Controller is connected, the Mouse and the Keyboard provides the input (Keys_and_Mouse.py).
Have Fun :)