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
1
Question by markmmiller · Nov 27, 2013 at 07:30 AM · triggerinputmanagergetaxisxboxcontrollerxbox360

How to get individual trigger input using Xbox 360 controller?

Hey all,

I've been wanting to do some stuff with Xbox 360 controllers and was going through and setting up a basic debug scene based off the material found here : http://wiki.unity3d.com/index.php?title=Xbox360Controller

Now I understand that to get the way the triggers normally work you use the "3rd axis" this gets both of the trigger inputs as a range between -1 - +1 with each trigger cancelling each other out when pressed. I have this version working so far.

I know to get the individual triggers I am supposed to use the 9th and 10th joystick axis instead. For some reason when I set it up to do so, even using the same input manager that is in the website it does not work. I might be missing some simple step but currently I am unsure what to do as I get no feed back on the triggers when using axis 9 and 10.

I am using Unity 4.3 currently.

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

3 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by markmmiller · Nov 29, 2013 at 06:47 PM

Fixed. For some reason after running the application from within the editor I had to make sure the focus was specifically inside the game window. Every other control was working whilst focus was outside of the window but only once I clicked inside did the triggers work.

Comment
Add comment · Show 3 · 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 markmmiller · Nov 29, 2013 at 10:32 PM 0
Share

Also switched over to Xinput to get rumble working. https://github.com/speps/XInputDotNet

avatar image DadPool · Jan 15, 2015 at 08:28 AM 1
Share

So using the 9th axis and 10th axis worked for both triggers. Verry Good to know thanks.

avatar image yourfurryfiend DadPool · Jan 08, 2016 at 06:43 PM 0
Share

I just wanted to add that you have to also set the 'Joy Num' in the Input Inspector options. The default is 'Get $$anonymous$$otion from all Joysticks' and you have to change it to a specific Joystick in the dropdown to receive any value from the 9th and 10th axes. Thanks!

avatar image
0

Answer by TheOnly1ZombieGamer · Apr 03, 2018 at 10:33 PM

I actually need a little help with this, i am using a Xbox One controller in unity and i have everything working except for the triggers, im trying to use RT with Fire 1 for a attack but when i set it to Joystick Axis, Axis as 10, and Joy Num as a random joystick number i still get no response from the trigger. please help me.

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
avatar image
0

Answer by KeithW · Jun 01, 2018 at 06:24 PM

@TheOnly1ZombieGamer For right trigger, my settings are
Name: Fire 1
Gravity: 1000
Dead: 0.2
Sensitivity: 1000
Snap: checked
Type: Joystick Axis
Axis: 10th Axis
Joy Num: Get Motion from all Joysticks

Everything else is blank.

If you are setting Joy num to a "random" joystick number, it will not work unless you have that many joysticks and are testing the correctly numbered joystick. So, either set it to Joystick 1 or All Joysticks.

Also, to get responses from the 9th or 10th axis, you must click in the game window to make it active in the editor.

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

19 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Can't get Triggers to Work [Solved] 1 Answer

PAD Xbox 360 0 Answers

Input Snap option not returning 0? 0 Answers

Approach for forcing player movement 0 Answers

How to make an Xbox360 remote rumble/vibrate? 0 Answers


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