Controller Inputs

i’ve got a 360 controller now have been testing the buttons - i can get all but 2 to work - the larger (lower) triggers or shoulder buttons. what i’ve figured out so far:

joystick buttons:

00 =
01 =
02 =
03 =
04 =
05 = hat up
06 = hat down
07 = hat left
08 = hat right
09 = start
10 = back
11 = left analog click
12 = right analog click
13 = shoulder top left
14 = shoulder top right
15 = xbox
16 = a
17 = b
18 = x
19 = y

i also don’t understand why i have five open slots at the beginning but only two missing buttons - none of these slots get any response from the triggers (or anything).

for reference i have the axes for the analogs set up as follows (this works fine):

move horizontal = X axis
move vertical = Y axis
look horizontal = 3rd axis
look vertical = 4th axis

anybody have any experience with this?

bump - anyone?

But aren’t those analog like the thumb-sticks? If so then they might not be treated as “buttons” and not appear in this list. As to why there are open slots, maybe they initially imagined an even larger set of buttons early on (and collapsing to use the lower spaces might have broken content already in the works)? I just don’t know what those empties would be as I don’t have any direct experience here, sorry…

Hope that helps, or at least makes this a less lonely thread. :stuck_out_tongue:

hmm, that does make sense but i just ran through them all (joystick axes) nothing seems to work. evrything else works great - just can’t get these two(important) triggers going…

; )

I just sent you a reply to our PMs on this issue. The weird thing is I can get the triggers to work on the 5th and 6th axes, but my mappings for the buttons are slightly different than the ones you listed. Could this be a driver issue. I’m still on version 0.02 of Colin Munro’s 360 driver since I really haven’t experimented with with the 360 controller inside Unity in a while (I use it all the time for emulators though and it works great).

Let us know if you get the triggers working (and on what axes)… I had no problem mapping them to 5 and 6. Maybe I’ll go through all the buttons and axes right now and post a list to see just how different our configurations actually are.

Ethan

[Edit- Quick and dirty rundown of my 360 buttons]

Button 0 - nothing
Button 1 - nothing
Button 2 - DPad Up
Button 3 - DPad Down
Button 4 - DPad Left
Button 5 - DPad Right
Button 6 - Start
Button 7 - Back
Button 8 - Left Analog Stick Press
Button 9 - Right Analog Stick Press
Button 10 - Left Shoulder Button
Button 11 - Right Shoulder Button
Button 12 - XBox Button
Button 13 - A
Button 14 - B
Button 15 - X
Button 16 - Y
Button 17 - nothing
Button 18 - nothing
Button 19 - nothing

Analog Stick Axes Same as drJones

5th Axis - Left Trigger
6th Axis - Right Trigger

hmm - no luck here (i just retried all the axes with the gravity-dead-sesitivity settings you sent). i think you’re right it might be a driver issue as i’m using the latest .05 - i’ll play with it some more though.

thanks antenna ; )

Well after playing around with the 360 controller again today in an FPS setting with Unity I must say that it would be great to standardize the inputs of this controller so we could safely make it a solid option for Unity games. Does OTEE have any more input into how the 360 controller coud work as a standard controller without any of these problems?

A solid and consistent set of drivers? Documentation as to what folks should expect out of the controller? Sorry but I’ll admit once again that I’m not very experienced with using the 360 controller on a Mac/PC but from the “outside” it seems as if it’s not well put together just yet… Please feel free to direct me to any links for info that you have as I’d definitely like to read up on this a bit more (doing some searching on my own as well but anything you have handy would help speed my efforts :slight_smile: ).

you’ve probably seen this already but here’s the site where the driver is located hig:

http://tattiebogle.net/index.php/ProjectRoot/Xbox360Controller/OsxDriver

i was thinking of just sending a message to him but the thing is it works fine in the driver control panel (the triggers register in the built in tester) - so it would seem to me its unity that is having the issue. i’ll continue testing it when i get the time.

you’re right though - the driver is still young at this point (the mapping has changed at least once already) so its hard to say.

Yep, I’ve seen that link, thanks for making sure though. The problem here is that it will be very hard for us to do much of anything when this is 3rd party unofficial driver sets that are changing (often?). Don’t get me wrong, I like the direction you’re going with this and it’s worthy of discussion, but it’s just that I’m a bit hesitant when it comes to spending any of our time/energy as we have so much other work to do.

If/when we have some spare bandwidth I hope we can take a look at this a bit closer, until then I fear you’re entering the land of the unknown without us. Be brave! :stuck_out_tongue:

Not sure I’ll be much help, but I’ve done some XNA programming and the difference between the axis of the thumbsticks as opposed to the triggers is that the thumbsticks go from -1 to 1. the triggers just go from 0 to 1.

Again, not sure if it helps…just offering some info…

Hi,

I realize there’s a bunch out there on this topic, but I’m still having trouble getting any axis controls to work. Buttons work fine, but the axis doesn’t seem to see it.

var cubeSpeed : int;

function Update () 
{
  var x = Input.GetAxis("Horizontal") * Time.deltaTime * cubeSpeed;
  var z = Input.GetAxis("Vertical")*Time.deltaTime * cubeSpeed;
  transform.Translate(x, 0 , z);

And in the input manager I’ve set the Horizontal to:
Type joystick Axis
Axis 7th axis(joysticks)

Any help would be appreciated. Thank you. :slight_smile:

@ProfCWalker:

  1. Welcome to the forums! :smile:

  2. When posting code, use the “Code” button, or manually wrap your code in code tags ([ code ]…[ /code ], without the spaces) for better formatting (I’ve edited your post as an example).

  3. I’m not sure your question really warrants tacking on to the end of someone else’s thread. You’ll likely do better by posting in your own thread and starting something anew.

Your code in general looks ok, does it work when using the arrow keys and/or WASD? How are you verifying that things are “working” versus not? What do you set cubeSpeed to in the inspector? I see that you’re not properly closing your Update function with a trailing }, is that a copy/paste error or is this all due to that and you’re not noticing the script/compile error?

Wait… so Unity can make Xbox360 games for the 360? Just wondering (I know it’s not completly related to the subject but I had to ask).

No, Unity cannot yet support the creation of XBox titles (neither retail nor XBLA). This is a discussion about using controllers with desktop computers, and one controller folks like to use is a XBox 360 controller by installing the required drivers.

Ohh ok. Thanks for the info! :stuck_out_tongue: But do you know when exactly it will be allowed on xbox consoles?

Thank you for the quick reply.

  1. Yep, it was just a code snippet I pasted in.

  2. Thank you for the Code cleanup on the previous post.

  3. WASD works with it.

My initial ‘checking’ for the 360 controller was testing it at: http://www.rotorheadgame.com/unity/joytest.html. Everything worked in terms of response.

My cubeSpeed was just a var multiplied by Time.deltaTime and assigned to objects transform, which works with the keys.

If you think starting a new thread would work better, I would be happy to do it. :slight_smile:

Thank you!

No. This has been asked a number of times here on the forums so search around for prior threads. We haven’t announced anything so there’s just no information to share at this time. Let’s get back on topic please. :slight_smile:

Odd, perhaps you can check with whoever made that demo? Sorry but I’m just not adept at X360 controller issues and was hoping to catch some low hanging fruit here (like cubeSpeed of zero or a script error). :stuck_out_tongue:

For now we’ll roll with it here. :slight_smile:

Anyone out there with first-hand X360 controller experience, please chime in!

Oh yeah ok. Sorry about that. :sweat_smile:

Just wanted to let you know I got it working. I’ll post a complete packet and write up on this shortly for those that need assistance.

Thanks