microsoft / MixedRealityToolkit-Unity

This repository is for the legacy Mixed Reality Toolkit (MRTK) v2. For the latest version of the MRTK please visit https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity
https://aka.ms/mrtkdocs
MIT License
6.01k stars 2.12k forks source link

Mapping of Xbox Controller #1551

Closed humpalum closed 6 years ago

humpalum commented 6 years ago

Overview

Controller is not correctly mapped. Some Buttons dont work at all.

Expected Behavior

Working Buttons.

Actual Behavior

Dpad is controlling the "RightTrigger" Trigger not reacting at all. Same with right stick.

See this youtube video. It shows a Xbox Controller example Scene with the Xbox input not working correctly. https://youtu.be/jLdp97GnPYk

Steps to reproduce

With this Repo. Boot up the example scene. (MixedRealityToolkit-Unity/Assets/HoloToolkit-Examples/Input/Scenes/XboxControllerExample.unity) Had to apply the project settings in order to get the controller work at all. Then just build and deploy it to the Hololens.

Unity Editor Version

2017.2.1f1 - However, it didn't worked with earlier aswell.

Mixed Reality Toolkit Release Version

Current release.

StephenHodgson commented 6 years ago

Did you update your input mappings via MR Toolkit menu -> Configure -> Project Settings?

humpalum commented 6 years ago

Jup, done that. Further we testet it, so that every Axis ist Kappes to something and made a simple debugoutput to check If there is any response at all. The 10th Axis was driven by the dpad. The Trigger and the right stick did not change any value of the axis at all.

johnyu89 commented 6 years ago

Have the same issue with this current release of the mixed reality toolkit

Dpad is controlling RightTrigger Left and Right Trigger no response but Shared trigger is working. Right stick has no response.

Checked project settings input manager and everything is mapped correctly. One thing to note is when the controller is plugged in via USB on the computer and tested on the unity editor, it is working properly. Once project is loaded onto the hololens then some of the mapping is incorrect.

StephenHodgson commented 6 years ago

Sounds like a driver issue for the controller on the HoloLens itself.

humpalum commented 6 years ago

https://www.assetstore.unity3d.com/en/#!/content/70068

The example of that one works quite solid. So i guess its not an driver issue?

StephenHodgson commented 6 years ago

That link was bad.

In either case, the resource you've linked could be using a method that's outside of what Unity uses to map and provide input. Chances are they're either using the Windows UWP APIs or XInput.

Also, be sure to check that the HID capabilities have been enabled for your application in the Project Settings. That also affects how input is handed on the target device.

StephenHodgson commented 6 years ago

https://developer.microsoft.com/en-us/windows/mixed-reality/hololens_known_issues#xbox_wireless_controller

keveleigh commented 6 years ago

Additionally, make sure your controller firmware is up to date:

https://support.xbox.com/en-US/xbox-on-windows/accessories/how-to-update-xbox-one-controller-windows-10

I've seen various issues go away after updating everything.

EDIT: This was mentioned in @StephenHodgson's link, but definitely worth reiterating :)

StephenHodgson commented 6 years ago

duplicate of #1490