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 /
  • Help Room /
avatar image
0
Question by TurboThriller · Sep 28, 2019 at 06:21 PM · inputcontrollersplit-screensplitscreen

Controllers not properly sending inputs to the game, sometimes sending phantom inputs

Hey there. My friend and I have been working on a game for a while now. We've recently found that when two controllers are plugged into the PC at once, the controllers no longer properly send inputs to the game (or at least that's what seems to be happening?) The issue can be seen here -https://streamable.com/8dadm - as I've got 2 controllers plugged in. This doesn't happen at all with a single controller plugged in. I've triple checked my input manager. Here's the code we have for the camera rotation: (not sure how to ensure that the code block properly appears, here's hoping it does haha)

 public void Update()
 {
     rotAroundX += Input.GetAxis("Mouse Y") * player.Xsensitivity;
     rotAroundY += Input.GetAxis("Mouse X") * player.Ysensitivity;

     rotAroundX += Input.GetAxis("Joy" + player.playerID + "Axis5") * -player.Xsensitivity;
     rotAroundY += Input.GetAxis("Joy" + player.playerID + "Axis4") * player.Ysensitivity;

     // Clamp rotation values
     rotAroundX = Mathf.Clamp(rotAroundX, player.XMinRotation, player.XMaxRotation);

     CameraRotation();
 }

 private void CameraRotation()
 {
     player.target.transform.rotation = Quaternion.Euler(-rotAroundX, rotAroundY, 0);
     cam.transform.rotation = Quaternion.Slerp(cam.transform.rotation, player.target.transform.rotation, player.slerpAmount);
 }

 public void LateUpdate()
 {
     Vector3 targetPos = player.target.position + (player.transform.forward * player.offset);
     Vector3 smoothPos = Vector3.Lerp(player.transform.position, targetPos, player.smoothSpeed * Time.deltaTime);
     player.transform.position = smoothPos;
 }


Obviously the method of moving one object before the camera is a bit strange, but it works well for our needs.

It's a really nerve-wracking issue as there seems to be no real source of the problem. We were using Rewired a while ago but got rid of it since we weren't using it, and thought it might be the source of the issue, but it made no difference. We also thought it might have been my own computer, so we tried it on 3 more and the issue persisted. We then tested several different controllers, and it was still there. I actually even imported all of the Assets from the project into a new project and hooked up the character controllers we had to fresh new characters and the issue was still there. We've tried putting the inputs in the FixedUpdate and LateUpdate, but it made no difference. The weirdest thing is that the issue will sometimes come and go. For instance, we'll have short playable moments of the game where the controllers will work but then inevitably stop. Any help would be greatly appreciated! I've hit a brick wall, and so has my pal.

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

0 Replies

· Add your reply
  • Sort: 

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

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

Related Questions

Working with multiple joystick models 0 Answers

How to clear the keyboard buffer 1 Answer

Pro controller not vibrating 0 Answers

How to disable Vive Controllers 5.5 support 1 Answer

How to prevent a variable used in two functions from being overridden? [SOLVED] 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