Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Supported Game Controllers?

Discussion in 'General Discussion' started by JDMulti, Dec 30, 2014.

  1. JDMulti

    JDMulti

    Joined:
    Jan 4, 2012
    Posts:
    384
    Since a while I've got acces to a Oculus Rift DK2. However I'm searching for a good game controller that's supported by default in Unity. I'm not sure which controller would fit best not only for Oculus Rift, but also for normal gameplay.

    Features I need:
    - Plug and Play, no hacking or searching web endless for drivers and such
    - Windows 7 and higher, Mac, Linux
    - Supported by Unity by default, sort of, to make development easier

    So far I came across this webpage for the Xbox 360 controller.
    http://wiki.unity3d.com/index.php?title=Xbox360Controller

    I was just wondering, if this is the only controller that works well? As for what I read, Mac is a bit hacky and need some opensource driver and PS3 controller is a hassle to get it working. I'm looking for good support, one that fits all OS'es without much problems.
     
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,398
    Any standard USB controller will work; probably Logitech is the most common. Console gamepads are more problematic and you'd want to stay away from them if you want something that "just works" on a computer.

    --Eric
     
  3. JDMulti

    JDMulti

    Joined:
    Jan 4, 2012
    Posts:
    384
    Is there any information which controllers do work fine with some tweaking of the Input Manager? I only found information about the XBox 360 and nothing else. I don't want to buy a game controller to find out afterwards that it's a hell to work with and end up with trial and error buying all kinds of controllers. Just thought there would be someone with experience about this subject.
     
  4. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,398
    Any standard USB gamepad will work without any tweaking; the joystick axes and buttons just work. If it requires special drivers like console gamepads do (since they're made for specific consoles, not computers), it may or may not work. Speaking as someone with experience about this subject.

    --Eric
     
    Cogent and BrandyStarbrite like this.
  5. JDMulti

    JDMulti

    Joined:
    Jan 4, 2012
    Posts:
    384
    Do you have any experience with which usb gamepads are any good? =)
     
    BrandyStarbrite likes this.
  6. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,398
    That's largely a matter of personal preference. As I said, Logitech is the most common; you could read some reviews. Most gamepads are pretty cheap ($20-$30), at least the wired ones, so it's not exactly the end of the world if you buy more than one.

    --Eric
     
    BrandyStarbrite likes this.
  7. JDMulti

    JDMulti

    Joined:
    Jan 4, 2012
    Posts:
    384
    I understand that such a price isn't going to end the world. I was just wondering if there were people with experience with all kinds of gamepads before I would invent the wheel all over again. But thanks for the help, I'll check out some reviews and buy one of which I think would fit best.
     
  8. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,398
    Once again, they will all work fine, as long as they are standard USB controllers. So it's up to you which you like best. Console-specific controllers are more iffy because they need special drivers.

    --Eric
     
  9. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,064
    I've been using a PlayStation 2 gamepad via a USB adapter for gaming purposes. I haven't tried it in Unity, but it works without drivers.
     
    Last edited: Jan 2, 2015
  10. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,500
    With a noteable exception being the Xbox 360 gamepad on Windows, which is officially supported, and natively so since Windows Vista. If you're on a Mac it's a whole other story, though.

    As Eric says, compatibility wise all of the standard PC ones are going to be fine as far as having them work goes. What's less handy is that the axis and button mapping between them isn't standardised, so for a PC game that you're going to distribute it's important that you allow some way to remap controls and, unfortunately, Unity's built in system doesn't support that. (The Asset Store can help you there.)
     
  11. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,548
    When I first started working with Unity I had the same type of reaction when it came to Unity with game controllers. The Xbox 360 controller is the controller that I have used. I have not used it on other platforms but others seem to have used it successfully on other platforms by others without too much effort.

    In my case I was also trying to get Flight Simulation controllers working and that is a bigger problem with more buttons (30+) than supported by the Unity Input Manager. The other problem was DirectX support is required by the drivers for Flight Simulation controllers on Windows platform. As you can imagine the amount of effort to write my own solution would be very high and that is just one platform.

    For me the best solution was found in the commercial product called Rewired (https://www.assetstore.unity3d.com/en/#!/content/21676). It does support plug and play for various controller types. It has extended support for different types of controllers (game pads / light guns / flight simulation, etc.) which you can find a list at this URL. http://guavaman.com/projects/rewired/docs/SupportedControllers.html. You can get an evaluation version and see if it works for you.

    EDIT: Rewired 1.0.0.112+ supports a larger number of Flight Simulation Controllers out of the box. Plus the greatest variety of controllers out of the box with 70+ different gamepads.
     
    Last edited: Feb 21, 2017
  12. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    There's a issue with Xbox controllers were they get mixed up and Unity thinks that two controllers are one. IIRC someone said using XInput on windows works.
     
  13. Voronoi

    Voronoi

    Joined:
    Jul 2, 2012
    Posts:
    571
    I'm on a Mac and have had problems with various game pads, particularly XBox. Not Unity specific, just getting the Mac to recognize them. The Sony Playstation Bluetooth were the easiest to set up, they just worked when paired. I don't recomend any USB controller that requires a 3rd party driver to be installed a PITA and not supported or updated.
     
  14. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,548
    What version of Windows was being used in that particular case? Microsoft recommends Xinput for Xbox 360 controllers. Installing DirectX End-User Runtime (June 2010) includes Xinput. There are also different versions of Xinput based on OS. I have this DirectX End-User Runtime (June 2010) runtime installed for both Windows 7 and Windows 8.1.

    Since I use Rewired I do not recall any problems with using two Xbox 360 controllers at the same time. Since Rewired supports 3 of the main input methods (Xinput, Raw Input and Direct Input) that covers most of controllers on Windows. In addition it supports hot plugging of controllers.
     
  15. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    I use a PS4 controller with DS4tool. It emulates an xbox360 controller and even enables the touch pad to be used as a mouse :D Both the clicking and moving. If you have a bad usb cable the program will crash your computer, but otherwise it's not much effort to setup. It even has button mapping so you can swap any buttons you want.
     
  16. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,548
    What version of Mac OS/X are you running? Are you running Sony PS3 or PS4 controllers?
     
  17. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    That was Windows 7 with nothing specific to make multiple controllers work.
     
  18. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,548
    Thanks for the clarification. Any issues with USB2 or USB 3 ports? Rewired works well for multiple controllers.
     
  19. Khyrid

    Khyrid

    Joined:
    Oct 8, 2010
    Posts:
    1,790
    I have tested with PS2, Xbox Controller S, and a Logitech Wing-man Extreme. All worked well in unity without any issues.(Win XP & Win 7)

    You just have to have a way for the player to bind controls, and that eliminates 99% of compatibility issues if not all. I haven't tried to use any modern console controllers on my PC.

    It would be nice if Microsoft, Sony and Nintendo would consider compatibility with PC and Mac. After-all one day their best games will be on steam and having the controllers able to carry over is a plus.

    The game project I am currently working on uses a controller (can use a keyboard, but clunky). I need PC gamers to be able to have a good controller on hand for my game to have any chance.
     
  20. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I use InControl, a free asset for Unity which merges all controllers under a common interface for Unity. It's pretty brilliant.
     
  21. Voronoi

    Voronoi

    Joined:
    Jul 2, 2012
    Posts:
    571
    PS3 and this was about 6 moths ago when I used them, before I was on Mavericks. I tried a USB GamePadZ and had issues.
     
  22. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    The Last of Us, Halo and Zelda on Steam.... seems legit.
     
  23. Wilbert-Blom

    Wilbert-Blom

    Joined:
    Aug 13, 2011
    Posts:
    108
    How do you get the PS4 Controller Touchpad working with the DS4Tool ?
    I've got the button and sticks working too but not the touchpad.
    Is it a Joystick axis or Mouse movement? What axis?
     
  24. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    http://www.tested.com/tech/gaming/459529-how-use-dualshock-4-pc/

    Haven't tried it myself since end users of any game couldn't be expected to have that setup, but it says the touchpad is mapped to the mouse if you enable it during setup.