Closed Bug 1353523 Opened 6 years ago Closed 6 years ago

Adjust threshold for Gamepad button `pressed` state and introduce pref to handle slightly sticky controller buttons


(Core :: WebVR, enhancement)

Not set



Tracking Status
firefox55 --- fixed


(Reporter: kngo, Assigned: daoshengmu)


(Blocks 1 open bug)



(1 file)

My HTC Vive controller trigger has a tiny bit of stickiness to it. Sometimes a trigger up doesn’t fully unset the gamepad `pressed` state. I have to pull up on the trigger a bit to release it.

In content such as A-Frame, this would cause bugs where if I released the trigger, my hand model would get often stuck in the grab/fist pose.

Adjust the default value a bit. Make it a preference to be changeable.
Example on HTC Vive, on Firefox Nightly:
Blocks: 1352418
No longer depends on: 1353481
Assignee: nobody → dmu
Blocks: 1299926
No longer blocks: 1352418
Blocks: 1353524
It is because HTC Vive has a threshold (0.55f) at their hardware for the trigger button. Only when the value around 0.55f will do the `pressed` state change. We can do some adjustment by our own if we want.
Blocks: 1356460
Comment on attachment 8859443 [details]
Bug 1353523 - Add adjustable threshold value for VR controller trigger inputs;

LGTM, Thanks!
Attachment #8859443 - Flags: review?(kgilbert) → review+
We're sorry, Autoland could not rebase your commits for you automatically. Please manually rebase your commits and try again.

hg error in cmd: hg rebase -s f1fb9e8cfd29 -d afe865149e0e: rebasing 391015:f1fb9e8cfd29 "Bug 1353523 - Add adjustable threshold value for VR controller trigger inputs; r=kip" (tip)
merging gfx/thebes/gfxPrefs.h
merging gfx/vr/gfxVROculus.cpp
merging gfx/vr/gfxVROpenVR.cpp
merging gfx/vr/gfxVROpenVR.h
merging modules/libpref/init/all.js
warning: conflicts while merging gfx/vr/gfxVROpenVR.cpp! (edit, then use 'hg resolve --mark')
unresolved conflicts (see hg resolve, then hg rebase --continue)
Pushed by
Add adjustable threshold value for VR controller trigger inputs; r=kip
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.