Ps4 Controller Script Fan Art

  • March 15, 2015
  • Blender 2.7x
  • Render: Blender Internal
  • Creator: 3DHaupt
  • License: CC-BY
You must be logged in to download.


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 (

PS4 Controller Python Script - Blender Game Engine


  • 3DHaupt profile picture

    Unfortunately, I do not have an Xbox 360 controller and now I wonder how different the input could be. I want an Xbox 360 controller :D, maybe I find one in a second hand store :)

    Written March 15, 2015
  • crazymoe2012 profile picture

    dude study the code and convert it

    Written March 16, 2015
  • DEEPgames profile picture

    Not everybody know how to code.

    Written March 16, 2015
  • DEEPgames profile picture

    By the way siege, you may be able to test it. I set up game pad support on an fps and I believe it worked for both ps3 and xbox 360, so it may also work with this coding... Just a thought.

    Written March 16, 2015
  • solarforge profile picture

    I will purchase a PS4 controller ASAP, and try this script out ; Thanks a lot for sharing this... I just tried it out with a Microsoft controller and a few buttons seem to be responding, not the right ones, but it sort of works :)

    Written March 16, 2015
  • 3DHaupt profile picture

    Cool, sounds like it would be easy to convert it for a Microsoft controller, its only a sorting thing I guess.

    Edited March 16, 2015
  • The_TiPi profile picture

    Reminds me Marbble Madness :D Great work ;)

    Written April 02, 2015
  • nad451 profile picture

    Works with a xbox 360 controller. One axis that controls the camera is wrong and the keys are not the same. Should be easy to edit in the script.

    Written May 09, 2015
  • wout profile picture

    wow !

    Written November 05, 2015
  • kotekote327 profile picture

    one question, can i use this script for my game?

    Written February 16, 2016
  • 3DHaupt profile picture

    Yes of course you can use it!

    Written January 13, 2017
  • logicjazzpianist profile picture

    In version 2.77 doesn't open with STANDALONE!!!

    Written May 08, 2016
  • Rainbowdash99 profile picture

    daaaamn i love you man

    Written October 15, 2016
  • cederom profile picture

    very nice! thanks! works like a charm on my macbookpro and ds4 over bluetooth! :-)

    Written January 12, 2017
  • 3DHaupt profile picture

    Nice to hear that it still works :)

    Written January 13, 2017
  • peterdegroote profile picture

    I will try to use it in a self made game in blender. thanx in advance.

    Written August 18, 2017
  • 3DHaupt profile picture

    Cool :)

    Written August 18, 2017
  • Josetjtj profile picture

    Blender creates video games for PC and there is an addon that can create video games for all types of consoles

    Written September 02, 2017
  • MisterOid profile picture

    Hey, is it possible to make this compatible with the UPBGE?

    Written January 23, 2018
  • turb0 profile picture

    it works it works it works :D

    Written April 23, 2018
  • itechnii profile picture

    Good Day! Thank you for this amazing little script! Is there a way for it to work with Blender 3D when animating the 3D camera in a scene to simulate that handheld camera move as opposed to manually moving the camera with a mouse?

    Thank you for sharing!

    Written March 06, 2020