0

I have a couple questions about Unity3d and Game Controllers on PC.

In Unity3d is it possible to use a game pad as an input source? If so, which game pads are supported (e.g. Xbox)? Do I need a plugin or someone else's code? Can I use the vibration?

Can I recieve input from multiple game pads at the same time (co-op for up to 4 players on same machine)?

I have looked several places, and it seems that using XInput will allow for Xbox controller support in Unity on Windows. I have seen nothing on multiple controller support (e.g. 2-4 controllers on the same PC). Thank you so much for your time!

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
Andrew Meservy
  • 103
  • 2
  • 9

1 Answers1

1

You can get input of a specific joystick using this

Joystick Buttons (from a specific joystick): “joystick 1 button 0”, “joystick 1 button 1”, “joystick 2 button 0”, …

http://docs.unity3d.com/Manual/ConventionalGameInput.html

Near the end of the page

Souradeep Nanda
  • 3,116
  • 2
  • 30
  • 44
  • You only answered the first question, but thanks for the info so far! I will keep this in mind, but do you know anything about vibration or multiple game pads at the same time? – Andrew Meservy Jul 24 '15 at 02:37
  • Use coroutines for doing anything simultaneously. http://docs.unity3d.com/Manual/Coroutines.html As far as vibration is concerned, check this link. http://answers.unity3d.com/questions/218084/xinput-how-do-i-access-vibration-on-360-controller.html?sort=oldest I dont have a 360 controller so I cant confirm. – Souradeep Nanda Jul 24 '15 at 13:27
  • Thanks, I am going to see if I can get it all working! – Andrew Meservy Jul 24 '15 at 16:51