Closed Bug 1346149 Opened 7 years ago Closed 7 years ago

Adjust Oculus Touch and OpenVR controller button mapping

Categories

(Core :: WebVR, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: daoshengmu, Assigned: daoshengmu)

References

Details

Attachments

(4 files)

For the consistent with other browser vendor, we should consider to move IndexTrigger and HandTrigger from axes to buttons and make buttons can have values in [0.0...1.0]; Besides, we should follow the order like below:

Left hand
`ovrButton_LThumb`
`IndexTrigger`,
`HandTrigger`
`ovrButton_X`
`ovrButton_Y`


Right hand
`ovrButton_RThumb`
`IndexTrigger`,
`HandTrigger`
`ovrButton_A`
`ovrButton_B`
Blocks: 1260558
Summary: Adjust Oculus Touch button mapping → Adjust Oculus Touch and OpenVR controller button mapping
In OpenVR controllers, it should use GetUint64TrackedDeviceProperty() to get this device supports buttons and axes other than the fixed buttons and axes properties.

Currently, In HTC Vive, the button and axis order like below:
Button:
`TrackPad`
`Trigger`
`Grip`
`ApplicationMenu`

Axis:
'TrackPad_X_axis'
'TrackPad_Y_axis'
(In reply to Daosheng Mu[:daoshengmu] from comment #0)
> For the consistent with other browser vendor, we should consider to move
> IndexTrigger and HandTrigger from axes to buttons and make buttons can have
> values in [0.0...1.0]; Besides, we should follow the order like below:
> 
> Left hand
> `ovrButton_LThumb`
> `IndexTrigger`,
> `HandTrigger`
> `ovrButton_X`
> `ovrButton_Y`
  `ovrTouch_LThumbRest`
>
 Axis
  `ThumbstickXAxis`
  `ThumbstickYAxis`
> 
> Right hand
> `ovrButton_RThumb`
> `IndexTrigger`,
> `HandTrigger`
> `ovrButton_A`
> `ovrButton_B`
  `ovrTouch_RThumbRest`
 Axis
  `ThumbstickXAxis`
  `ThumbstickYAxis`
Comment on attachment 8845812 [details]
Bug 1346149 - Part 1: Make button support value in VRSystemManager;

https://reviewboard.mozilla.org/r/118980/#review123170

lgtm
Attachment #8845812 - Flags: review?(kgilbert) → review+
Comment on attachment 8848027 [details]
Bug 1346149 - Part 2: Adjust Oculus Touch button and axis mapping;

https://reviewboard.mozilla.org/r/120990/#review123172

This looks good, thanks!
Attachment #8848027 - Flags: review?(kgilbert) → review+
Comment on attachment 8848028 [details]
Bug 1346149 - Part 3: Adjust OpenVR controllers button and axis mapping to be more flexible;

https://reviewboard.mozilla.org/r/120992/#review123176

This LGTM, thanks!
Attachment #8848028 - Flags: review?(kgilbert) → review+
(In reply to Daosheng Mu[:daoshengmu] from comment #14)
> Comment on attachment 8848028 [details]
> Bug 1346149 - Part 3: Adjust OpenVR controllers button and axis mapping to
> be more flexible;
> 
> Review request updated; see interdiff:
> https://reviewboard.mozilla.org/r/120992/diff/3-4/

I make a small changes on Button/Trigger process using mask to decrease type casting.
Assignee: nobody → dmu
Comment on attachment 8848350 [details]
Bug 1346149 - Part 4: No longer need the index attribute in VRControllerHost;

https://reviewboard.mozilla.org/r/121250/#review123572

LGTM, thanks for cleaning it up!
Attachment #8848350 - Flags: review?(kgilbert) → review+
Pushed by dmu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5f756281dc14
Part 1: Make button support value in VRSystemManager; r=kip
https://hg.mozilla.org/integration/autoland/rev/109db936e344
Part 2: Adjust Oculus Touch button and axis mapping; r=kip
https://hg.mozilla.org/integration/autoland/rev/45d7ca77e147
Part 3: Adjust OpenVR controllers button and axis mapping to be more flexible; r=kip
https://hg.mozilla.org/integration/autoland/rev/407f363abf4e
Part 4: No longer need the index attribute in VRControllerHost; r=kip
Blocks: 1299926
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: