Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by commodore · Aug 04, 2012 at 02:44 AM · controllerbuttonsmappingxbox controller

Controller trigger problem

Hello,

I'm making a game where you'll be able to play on a PC or Mac with either an xbox or PS3 controller. I've found different drivers that work with each variation but the problem I have is that the triggers are mapped differently for each driver.

Mac with PS3 Controller: The PS3 controller works natively with Mac 10.6 and up so if at all possible I'd like to refrain from having to find a new driver. The problem is the triggers are mapped to "joystick button 8" and "joystick button9" when it should be mapped to an axis. Because of this the value of each trigger can only be either 0 or 1 so it's not pressure sensitive.

Mac with xbox Controller I'm using the Tattiebogle driver for the xbox controller on a mac. The triggers are mapped to the 5th and 6th axes. No complaints here.

PC with xbox or PS3 controller I'm using the MotionJoy driver for the xbox and PS3 controller on a PC. It's a bitch to get it started compared to the Mac but that's not the real issue. The triggers are both mapped to the 3rd axis. L2 is 0 to 1 and R2 is 0 to -1. This is kind of cool but there's no way of telling if the user is holding down both triggers. I'll probably need to find a new driver for PC but from what I've read MotionJoy is the best. And it sucks IMO.

Unity should really have their own drivers download automatically when you download the Unity player.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Ingen · Aug 04, 2012 at 02:57 AM

go to input manager, To see the Input Manager choose: Edit->Project Settings->Input.

http://docs.unity3d.com/Documentation/Components/class-InputManager.html

http://docs.unity3d.com/Documentation/Manual/Input.html

and give to input same name i.e. "Fire1" "Fire2" "Jump" and other are presetting. but you can easily add other increasing size and use it for input

Input.GetButtonDown ("Fire1")

this should work

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image commodore · Aug 04, 2012 at 05:01 AM 0
Share

I know about the Input manager...

What I'm saying is the drivers I'm using each have different mappings. so for example the "start" button will be mapped to "joystick button 10" with the Tattiebogle driver but it'll be "joystick button 6" with the $$anonymous$$otionJoy driver which is what users must use for PC.

I've written a script that chooses which button to assign "start" to based on if you choose $$anonymous$$ac/PC and Xbox/PS3 at the start of the game. I had to do this because you can't change anything in the Input manager at runtime for some stupid reason. btw vote for the feedback

http://feedback.unity3d.com/unity/all-categories/1/top/active/scripting-expose-input-manager-

Now my problem is with the triggers. $$anonymous$$ac natively maps L2 and R2 to buttons 8 and 9 when they should be axes, Tattiebogle maps to axes 5 and 6 and $$anonymous$$otionJoy maps both to 3rd. L2 being 0 to 1 and R2 being 0 to -1.

$$anonymous$$y question is how do I get the triggers to act consistently? One driver makes them true/false, another maps them separately the way they're supposed to, and the other maps them as one axis so there's no way of telling if both triggers are being held.

avatar image neroziros · May 05, 2013 at 10:25 PM 0
Share

I'm having the same problem with L2/R2 (PC) did you manage to find a solution for this? Thanks in advance!

avatar image
0

Answer by KingMaharg · Oct 20, 2014 at 11:08 PM

The left and right triggers for PC are also mapped separately as the 9th and 10th axes respectively. Both got from 0-1. You should be able to use them just as you do on Mac from there.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

10 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Best use of GetButton 4 Answers

How to map input for new Samsung Gear VR controller? 3 Answers

How to achieve rumble/vibrate for Xb360 gamepad? 0 Answers

Are the controllers mapped the same? 0 Answers

Controller inverted with Xbox Gamepad 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges