Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

PS3 Button Map

Discussion in 'Made With Unity' started by ryand-unity, May 14, 2011.

  1. ryand-unity

    ryand-unity

    Joined:
    Jan 21, 2011
    Posts:
    547
    HI i made this button map so i can test my Games for the PS3, I think it mite be Right But im not Shir if it is, I used a PS3 PC Compatible Controller To make it and test it. if there is something Wrong whit this map plez tell me.

    $PS3_controller Button map.jpg $PS3_controller Axis.jpg
     
    Last edited: May 14, 2011
  2. Pedro Afonso

    Pedro Afonso

    Joined:
    Mar 13, 2011
    Posts:
    240
    hehe!
    this is good. what controller did you use or are using to test the games on pc?
     
  3. ryand-unity

    ryand-unity

    Joined:
    Jan 21, 2011
    Posts:
    547
    Tomcc PS3 Controller with USB Plug
     
  4. Pedro Afonso

    Pedro Afonso

    Joined:
    Mar 13, 2011
    Posts:
    240
    thank you.
    are you developing for the ps3 and hoping to find a publisher so you can get the approve from sony?
     
  5. ryand-unity

    ryand-unity

    Joined:
    Jan 21, 2011
    Posts:
    547
    yea kind of but i don't think it will be approved.
     
  6. Pedro Afonso

    Pedro Afonso

    Joined:
    Mar 13, 2011
    Posts:
    240
    why?
    do you know any sponsor that would be interested? if so you may have a chance!
     
  7. ryand-unity

    ryand-unity

    Joined:
    Jan 21, 2011
    Posts:
    547
    no i do not know any sponsor that would be interested. but if you can help that would be great
     
  8. Pedro Afonso

    Pedro Afonso

    Joined:
    Mar 13, 2011
    Posts:
    240
    no I don't know any eather
     
  9. mrbdrm

    mrbdrm

    Joined:
    Mar 22, 2009
    Posts:
    510
    did you buy the ps3 license from unity ?
     
  10. ryand-unity

    ryand-unity

    Joined:
    Jan 21, 2011
    Posts:
    547
    @mrbdrm nop I just took my PS3 controller and plugged it in to my PC can stared to play around with it on unity but you need to build the game before you can test it.
     
  11. mrbdrm

    mrbdrm

    Joined:
    Mar 22, 2009
    Posts:
    510
    aah , nice good job :)
     
  12. ryand-unity

    ryand-unity

    Joined:
    Jan 21, 2011
    Posts:
    547
    Thank you. :) and here is the Axis map for moveing and looking around
    if you Have the mouse look Script you will need to make a change to the input if you would like to try it i can give more info
    $PS3_controller Axis.jpg
     
  13. ryand-unity

    ryand-unity

    Joined:
    Jan 21, 2011
    Posts:
    547
  14. kag359six

    kag359six

    Joined:
    May 17, 2011
    Posts:
    3
    How did you make your controller compatible with unity 3d? Im trying to do the same. Also, is the axis map what i input into the button name in Unity when setting up the controls to call into scripts?
     
  15. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,551
    first: http://lmgtfy.com/?q=make+ps3+controller+work+on+pc

    once you make that work, the ps3 controller will then be recognized like any other gamepad plugged into the PC.

    then configure your input settings to use the joystick. example (not necessarily meant for a ps3 controller):

     
    matthewaranzanso, XCO and trannel like this.
  16. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,551
    Note that the PS3's directional pad is actually pressure sensitive.
     
  17. ryand-unity

    ryand-unity

    Joined:
    Jan 21, 2011
    Posts:
    547
    He is right good luck to all who use this.
     
    Micky_Firebird likes this.
  18. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,458
    I am glad I came upon this thread... because I need to set up my PS2 control to run in Unity I need to test the game... is there a input manager preset already made for this? :)
     
  19. ryand-unity

    ryand-unity

    Joined:
    Jan 21, 2011
    Posts:
    547
    nop you need to set it up your self
     
  20. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,458
    Oh ok...and I just wish there was a quick way to test it aside from building and running the game
     
  21. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,458
    This is awesome... I am liking how this is working out... the reference I am using for my mapping is Virtua Fighter and I am now wondering how to combine button presses in the input manager for lets say Punch + Guard = Throw or Punch+Kick+Guard = something else, how would I set this up... and do I have to set each face button to "Key or Mouse Button"?

    I already found the button numbers in my OS, just need confirmation

    Using PS2 controller here :) Thanks a bunch :)
     
    Last edited: Jul 11, 2011
  22. sirdavid23

    sirdavid23

    Joined:
    Jan 26, 2011
    Posts:
    22
    How possible is it to change first person controller prefab so that it will "look around" with the second axis analog controller?
    I read you can change x and y from mouse to game axis...but the controller doesn´t get recognized...

    Could anyone help please?
    Thanks.
     
  23. sirdavid23

    sirdavid23

    Joined:
    Jan 26, 2011
    Posts:
    22
    Did you finally get it to work? I followed the graphic´s suggestion. But my "playstation 2 - like" joypad isn´t doing anything on the first person controller I´ve setup on the scene. Why?
     
  24. auzzgames

    auzzgames

    Joined:
    Aug 16, 2013
    Posts:
    6
    Hmm... I used all these setting, Built and ran the game and... It does nothing... I'm using a Dualshock 3 and it's recognised, you can control it with the D-Pad and sqaure button to jump, but none of these settings work...
     
  25. Raven_Gothchild

    Raven_Gothchild

    Joined:
    Mar 20, 2014
    Posts:
    10
    Yep, I too tried this with the standard SixAxis controller and had the same problem. Has anyone come up with a solution?
     
  26. triLight

    triLight

    Joined:
    May 7, 2014
    Posts:
    30
    Different devices and different drivers can have different results.

    I have a Sony brand PS3 wireless controller Model No. CECHZC2U-a1 plug and played as a HID-compliant game controller and everything works fine except the Six Axis Gyro (obviously) and the left and right Joysticks which is weird. Also now I request a new feature in the Input Manager to Save, Set, Import and Export Input Manager settings across projects and etc.
     
  27. davbar9

    davbar9

    Joined:
    May 19, 2014
    Posts:
    62
    How to use ps3 controller for unity game in Android?
     
  28. username4545sfs

    username4545sfs

    Joined:
    Jul 11, 2014
    Posts:
    1
    Okay, I've gotta call you out on this.
    It's bad forum edicate to suggest lmgtfy, not only is it sarcastic and rude, but googling can result in these forum pages since they are usually permanently indexed through the internet.
    In this case "use ps3 controller unity" (which is what I searched to find this page) results in this very page as the first result.

    If everyone said "go google it" on forums the internet would be a very useless place.

    Excuse me for being off topic.
     
    DinostabOMG likes this.
  29. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,551
    Hey sorry, I didn't mean to say "get lost" or anything like that. It's just that a Google search will always show something that hasn't 404'd, since it's a search result. The way to do this is so iffy so I thought I shouldn't recommend only one way to make it work.

    I just used lmgtfy since I thought it makes a shorter URL, so sorry about that. That wasn't my intention.

    In any case, I found this to be better than MotionInJoy (although it makes your PC think that an Xbox controller is plugged in): http://forums.pcsx2.net/Thread-XInput-Wrapper-for-DS3-and-Play-com-USB-Dual-DS2-Controller
     
    matthewaranzanso likes this.
  30. Micky_Firebird

    Micky_Firebird

    Joined:
    Mar 11, 2014
    Posts:
    1
    Thank You!!!!
     
  31. ScorpioGamer

    ScorpioGamer

    Joined:
    Oct 14, 2012
    Posts:
    9
    @AnomalusUndrdog I am having problems with the X & Y axis. It seems unity detects D-Pad instead of the Left analog.
     
  32. ScorpioGamer

    ScorpioGamer

    Joined:
    Oct 14, 2012
    Posts:
    9
    Looks like there was something wrong with the driver, its working now!
     
  33. SwagGamez

    SwagGamez

    Joined:
    May 6, 2015
    Posts:
    5
    My Left & Right Joysticks aren't working? Any suggestions?
     
  34. Reizla

    Reizla

    Joined:
    Nov 5, 2013
    Posts:
    136
    Is there ANY way to get an original (wireless) PS3 controller to work with Windows? Windows does recognize my PS3 controller and it's lights keep flashing (means it's acquiring a controller ID on the PS3). Sadly, I can't use the controller at all. Even Windows calibration stays dead :(
     
  35. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,605
    You have to install a special driver for it. See below:

    Drivers:
    http://forums.pcsx2.net/Thread-XInput-Wrapper-for-DS3-and-Play-com-USB-Dual-DS2-Controller (Makes DS3 act as an XInput device for greater compatibility with games. Probably simpler setup than Better DS3.)
    http://betterds3.ciebiera.net/ (Like Motion In Joy, but better. A lot of customization options. I _believe_ it requires Motion In Joy driver to be installed as well. I personally don't like Motion In Joy and would chose the 1st option.)

    Tutorials/Setup:
    http://emulation-general.wikia.com/wiki/SCP_Driver_Package
    http://twigstechtips.blogspot.com/2014/04/how-to-use-your-ps3-controller-ds3-dual.html
     
    Last edited: Aug 14, 2015
  36. matthewaranzanso

    matthewaranzanso

    Joined:
    Nov 10, 2015
    Posts:
    2
    I am using iPega-9021 Bluetooth controller for my project and found this thread and it works! Thank you!
     
  37. jasmeen

    jasmeen

    Joined:
    Feb 25, 2016
    Posts:
    1
    I just took my PS3 controller and plugged it in to my PC can stared to play around with it on unity but you need to build the game before you can test it.
    THINKS FOR SHARING
     
  38. KCRahmat

    KCRahmat

    Joined:
    Sep 6, 2016
    Posts:
    1
    it move with pc platform, how can it work to android platform?
     
  39. jethrogillgren

    jethrogillgren

    Joined:
    Jan 11, 2017
    Posts:
    28
    In 2018, On a Mac, Unity 2017.3.1p1 connecting the DUALSHOCK 3 SIXAXIS PS3 controller gave me a different mapping.
    Unsure what has changed, but i'll list the new mapping for any future readers:


    Buttons:
    Select 0
    Left Joystick Click 1
    Right Joystick Click 2
    Start 3
    DPad U 4
    DPad R 5
    D Pad D 6
    DPadL 7
    L2 8
    R2 9
    L1 10
    R1 11
    Triangle 12
    Circle 13
    X 14
    Square 15

    Axes:
    Left Joystick Horizontal: X
    Left Joystick Vertical: Y
    Right Joystick Horizontal: 3rd
    Right Joystick Vertical: 4th



    Also, here is my test Unity project, where you can download the InputManager file or a fill example showing a controller working.
    https://github.com/jethrogillgren/PS3_Unity_TestScene




    If anyone wants to make a better looking reference/Testing Project please feel free pull request the repo above
     
  40. Wuagliono98

    Wuagliono98

    Joined:
    Jan 5, 2019
    Posts:
    1
    I hope this post can help.
    I use Input.GetAxis() instead Input.GetAxisRaw() to catch the value of the X axis and Y axis from the left analog stick
     
  41. Roman_Keivan

    Roman_Keivan

    Joined:
    May 31, 2019
    Posts:
    21
    Thanks everyone guys, I'ts work for me
     
  42. Oris

    Oris

    Joined:
    Oct 6, 2014
    Posts:
    3