Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 AlejandroBoss · Feb 27, 2017 at 09:36 PM · buttonsinputmanagercontrollersxbox360ps3

Multiple controller buttons Xbox 360 & PS3 different controllers

I have a 2 player game and each player has their own script with their own button and joystick names. E.g the PS3's triangle button in the code and Edit-Input manager is "PS3_Triangle" and the 360's Y button is "X360_Y" in the code and Edit-Input Manager. The joysticks work fine with only the 360 controller moving only the first player and the PS3 controller moving only the second player. Now the buttons are EXTREMELY annoying for me. The Y button is supposed to jump only for the first player and the Triangle button only on the second player, but for some reason the Y button and Triangle button control both players (well actually all the buttons control the other player as well.) I want a way that only the Y button on the 360 controller jumps only for player 1 and the Triangle button jumps only for player 2. In the Input Manager, the positive button slot, I have it named "joystick button 3" for the Y button on 360 with the Joy Num set to Joystick 1 and the slot named "joystick 0" for the Triangle button on PS3 with the Joy Num set to Joystick 2. Each player's script calls for the button that's supposed to do an action but for some reason the other controller's button can do the same for it. Would the problem be in Input Manager or in my code? I doubt that it's my code because the joysticks only move the player that their supposed to move. I could really use some help since I'm a sophomore in highschool and we're barely starting Unity this year. I'm not sure if this helps, but the name for the Y button is "X360_Y" and the name for the Triangle button is "PS3_Triangle" and that's what the script references. Below is a sample of the script for the RB button 360 controller. The script is C# if (Input.GetButtonDown("X360_A") && aim == true) { svumode = 2;// animation mode camera1.GetComponent().fieldOfView = 60;// camera depth = 60 aim = false; GameSettings.Sens = 10;//mouse sensitivity = 1 }

the script posted above is for the 360 controller. The one for PS3 buttons just says what I named them. Please help me with this problem. I will be as clear as possible.thanks

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
0

Answer by metalted · Feb 27, 2017 at 10:56 PM

If i may quote some Jackson 5, Multiplayer isn't as easy as 1 2 3. Like you said, you are barelly starting out with Unity. Dont know how your coding skills are, but if you just started coding, i think this is a bit out of reach. Being able to create what you want, you have to know how to work the input manager, use controllers and more important use 2 different controllers that have different settings and behaviours.

What you want is not impossible, but it takes time to learn, to create and test. If i were you I try to take little steps to get where you want to be and learn as much as you can along the way.

How I would do this: -Make the game single player first. -Try multiplayer by sharing a keyboard. -Try adding 1 controller, best guess is probably the 360.

If you done that, you might have gotten the knowledge to make the Input manager do what you want. Then try to add the PS controller. The idea of doing this already gives me a headache. But its probably not impossible.

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

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

Related Questions

Platform Dev Pricing 1 Answer

Mapping multiple controllers 1 Answer

Unity reading brand of controller 1 Answer

Controller shoulder buttons firing both at the same time. 0 Answers

Triggers on the 360 controller treated as one axis? 3 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