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 Adam 10 · Apr 03, 2011 at 08:11 PM · inputcontrolleraxisjoystickxbox360

360 Trigger Pressing both Triggers at the same time

So, I am sorry if this is answered, but I am using the Left Trigger and Right Triggers on my 360 controller to fire the left and right weapons accordingly. So I have

if(Input.GetAxis("P1Trigger") == 1){ FireLeft(); }

if(Input.GetAxis("P1Trigger") == -1){ FireRight(); }

When they aren't pressed the 3rd Axis is 0, but it seems that when both are pressed the 3rd Axis is also 0. I know that if I create P1LtTrigger and P1RtTrigger and invert 1 of them I can get them to fire both on one trigger press, but that's not what I am need.

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

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by AngryOldMan · Apr 03, 2011 at 09:12 PM

Can you seperate your axis in the input section. so instead of P1Trigger you will have P1LeftTrigger and P1RightTrigger

http://answers.unity3d.com/questions/21111/triggers-on-the-360-controller-treated-as-one-axis

http://answers.unity3d.com/questions/581/what-are-all-the-joystick-buttons-for-an-xbox-360-pc-controller

this questions been bugging me so I looked into it a bit more and found this http://speps.fr/xinputdotnet which is a website for a piece of 3rd party software which (i believe) allows you to skip over the DirectInput that Unity uses to map controllers and uses XInput instead.

Comment
Add comment · Show 6 · 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 Adam 10 · Apr 03, 2011 at 10:24 PM 0
Share

How do you separate the axis if the triggers are the 3rd Axis by putting them separate and still selecting 3rd Axis you still are doing the same thing aren't you?

avatar image AngryOldMan · Apr 03, 2011 at 11:06 PM 0
Share

Did you even try it before posting that comment? They are only supposed to be mapped between 0 and 1. Take a look at the other questions regarding this matter. Update in answer

avatar image Adam 10 · Apr 03, 2011 at 11:13 PM 0
Share

Well clearly I had tried that since in my Question I have indicated putting PlLtTrigger and P1RtTrigger, but I apparently don't understand the mapping. For Axis you choose 3rd as that's the trigger and according to what I have read its -1 0 1, so I don't understand.

avatar image AngryOldMan · Apr 04, 2011 at 12:27 AM 0
Share

read the updated post,people have had the same problem. Not sure if there is a solution but give them a try, maybe you will work something out in doing so.

avatar image Adam 10 · Apr 04, 2011 at 01:32 AM 0
Share

Alright Ill keep messing with it, I was working another issue, but thanks for trying to clear it up for me.

Show more comments

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

No one has followed this question yet.

Related Questions

Problems with joystick / controller axes being 1/-1 "way too often" 1 Answer

Controller Joystick Hold Delay Logic? 1 Answer

Gamecube Controller joystick axis does not work? 0 Answers

problems moving game object with the right joystick 1 Answer

Using Input.GetJoystickNames 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