Controller Inputs
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Unity Community Index // Unity Support
View previous topic :: View next topic  
Author Message
drJones



Joined: 19 Oct 2005
Posts: 1342
Location: New Hampshire

PostPosted: Mon May 28, 2007 4:18 pm    Post subject: Controller Inputs Reply with quote
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?

_________________
-O
Back to top
View user's profile Send private message
drJones



Joined: 19 Oct 2005
Posts: 1342
Location: New Hampshire

PostPosted: Tue May 29, 2007 2:38 pm    Post subject: Reply with quote
bump - anyone?
_________________
-O
Back to top
View user's profile Send private message
HiggyB
Unity Product Evangelist


Joined: 08 Dec 2006
Posts: 6152
Location: San Francisco CA USA

PostPosted: Tue May 29, 2007 2:52 pm    Post subject: Re: Controller Inputs Reply with quote
drJones wrote:
i can get all but 2 to work - the larger (lower) triggers

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. Razz

_________________
Tom Higgins - Product Evangelist at Unity Technologies ApS
http://unity3d.com | http://blogs.unity3d.com

Want to discuss my avatar? Do it here.

UNITE 2010, Save the Date: Nov. 10-12 in Montreal!
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
drJones



Joined: 19 Oct 2005
Posts: 1342
Location: New Hampshire

PostPosted: Tue May 29, 2007 3:21 pm    Post subject: Re: Controller Inputs Reply with quote
HiggyB wrote:
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.


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...

HiggyB wrote:
Hope that helps, or at least makes this a less lonely thread. Razz


; )

_________________
-O
Back to top
View user's profile Send private message
aNTeNNa trEE
Unity Demo Team


Joined: 30 Oct 2005
Posts: 3539
Location: Unity HQ, Copenhagen

PostPosted: Tue Jun 05, 2007 2:11 am    Post subject: Reply with quote
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

_________________
Ethan Vosburgh - Artist at Unity Technologies
http://twitter.com/antenna_tree
Back to top
View user's profile Send private message
drJones



Joined: 19 Oct 2005
Posts: 1342
Location: New Hampshire

PostPosted: Tue Jun 05, 2007 3:25 am    Post subject: Reply with quote
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 ; )

_________________
-O
Back to top
View user's profile Send private message
aNTeNNa trEE
Unity Demo Team


Joined: 30 Oct 2005
Posts: 3539
Location: Unity HQ, Copenhagen

PostPosted: Tue Jun 05, 2007 4:17 am    Post subject: Reply with quote
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?
_________________
Ethan Vosburgh - Artist at Unity Technologies
http://twitter.com/antenna_tree
Back to top
View user's profile Send private message
HiggyB
Unity Product Evangelist


Joined: 08 Dec 2006
Posts: 6152
Location: San Francisco CA USA

PostPosted: Tue Jun 05, 2007 11:08 am    Post subject: Reply with quote
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 Smile ).
_________________
Tom Higgins - Product Evangelist at Unity Technologies ApS
http://unity3d.com | http://blogs.unity3d.com

Want to discuss my avatar? Do it here.

UNITE 2010, Save the Date: Nov. 10-12 in Montreal!
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
drJones



Joined: 19 Oct 2005
Posts: 1342
Location: New Hampshire

PostPosted: Tue Jun 05, 2007 1:18 pm    Post subject: Reply with quote
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.

_________________
-O
Back to top
View user's profile Send private message
HiggyB
Unity Product Evangelist


Joined: 08 Dec 2006
Posts: 6152
Location: San Francisco CA USA

PostPosted: Tue Jun 05, 2007 1:31 pm    Post subject: Reply with quote
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! Razz

_________________
Tom Higgins - Product Evangelist at Unity Technologies ApS
http://unity3d.com | http://blogs.unity3d.com

Want to discuss my avatar? Do it here.

UNITE 2010, Save the Date: Nov. 10-12 in Montreal!
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
sbuchbinder



Joined: 04 Apr 2008
Posts: 53
Location: New York

PostPosted: Thu Apr 10, 2008 7:30 pm    Post subject: Reply with quote
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...
Back to top
View user's profile Send private message Visit poster's website AIM Address
ProfCWalker



Joined: 03 May 2009
Posts: 18
Location: Dallas, Texas

PostPosted: Tue Jul 28, 2009 7:41 am    Post subject: joystick question Reply with quote
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.

Code:
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. Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website
HiggyB
Unity Product Evangelist


Joined: 08 Dec 2006
Posts: 6152
Location: San Francisco CA USA

PostPosted: Wed Jul 29, 2009 6:36 pm    Post subject: Re: joystick question Reply with quote
@ProfCWalker:

1. Welcome to the forums! Very Happy

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?

_________________
Tom Higgins - Product Evangelist at Unity Technologies ApS
http://unity3d.com | http://blogs.unity3d.com

Want to discuss my avatar? Do it here.

UNITE 2010, Save the Date: Nov. 10-12 in Montreal!
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
bloobat



Joined: 15 Jun 2009
Posts: 63

PostPosted: Thu Jul 30, 2009 12:42 am    Post subject: Reply with quote
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).
Back to top
View user's profile Send private message
HiggyB
Unity Product Evangelist


Joined: 08 Dec 2006
Posts: 6152
Location: San Francisco CA USA

PostPosted: Thu Jul 30, 2009 1:11 am    Post subject: Reply with quote
bloobat wrote:
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.

_________________
Tom Higgins - Product Evangelist at Unity Technologies ApS
http://unity3d.com | http://blogs.unity3d.com

Want to discuss my avatar? Do it here.

UNITE 2010, Save the Date: Nov. 10-12 in Montreal!
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Post new topic   Reply to topic    Unity Community Index // Unity Support All times are GMT + 1 Hour
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum