-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable UI interactions using an Xbox controller #4398
Enable UI interactions using an Xbox controller #4398
Conversation
This reverts commit f9edf12.
…inter while dragging.
… mapping profile. Xbox controller code clean-up.
Cool! Clicking worked well, bounding box felt okay. Movement felt pretty off to me.
To see the expected behavior, I recommend bringing up windows mixed reality home and moving objects around using the gamepad there. |
I also noticed that when controller is in resting position the object moves around a bit, most noticeable with bounding box. I think you need a bit of a deadzone for the joystick. |
Was the controller also moving the camera when you tried it? If you disable the input simulation service, objects with a
Can we leave that for another PR? I'm not planing on spending more time on this.
That should be fixed by #4367 |
Sure, though we should file an issue so we don't forget. Created #4469 |
No, I don't think it was. I was using a VR headset, and did not notice any strange camera movement. Perhaps the missing piece is that I was using VR headset + gamepad, and you are just using editor simulation + gamepad? |
@@ -48,12 +48,42 @@ public XboxController(TrackingState trackingState, Handedness controllerHandedne | |||
new MixedRealityInteractionMapping(13, "B", AxisType.Digital, DeviceInputType.ButtonPress,KeyCode.JoystickButton1), | |||
new MixedRealityInteractionMapping(14, "X", AxisType.Digital, DeviceInputType.ButtonPress,KeyCode.JoystickButton2), | |||
new MixedRealityInteractionMapping(15, "Y", AxisType.Digital, DeviceInputType.ButtonPress,KeyCode.JoystickButton3), | |||
new MixedRealityInteractionMapping(16, "Spatial Pointer", AxisType.SixDof, DeviceInputType.SpatialPointer, MixedRealityInputAction.None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would an xbox controller ever have a spatial pointer?
Shouldn't the pointer just default to the user's gaze, and current selections be wired up properly via UI navigation events?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea was that by making the gamepad emulate a six DOF controller we would get interaction with our UI components for free, as they already consume the pointer position and rotation. The alternative is to add logic where required to explicitly handle actions like rotate, scale or move based on deltas. That being said, the more I look at it the more I like the second option.
The PR doesn't seem ready for check in and I can't spend more time on it so I'll close it. Anyone is welcome to take over either resurrecting this or starting anew.
Overview
Changes in this PR:
Changes