Hi,
this Blend File is my little example on how to setup a Playstation 4 Controller with only one Python Script.
https://3dhaupt.com/2017/01/21/sphere-of-steel-prototype-blender-game-engine/
The Ps4_Controller-Script includes all Buttons, the Hat and the Analog Stick recognition.
Also the sensibility of the Analog Stick will be recognized.
Controls:
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 have the Control
(Keys_and_Mouse.py).
Have fun and feel free to use it as Template :)
Downloadable!
http://www.blendswap.com/blends/view/78460