Closed Bug 1305892 Opened 8 years ago Closed 7 years ago

[webvr] Support Oculus Touch Haptic Feedback

Categories

(Core :: WebVR, defect, P3)

x86_64
Windows
defect

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: kip, Assigned: daoshengmu)

References

()

Details

(Keywords: feature, Whiteboard: [gfx-noted][webvr])

Attachments

(1 file)

Initially we will only support the "pulse()" function as described the in Gamepad API Extension spec.

Later, we could explore benefits of implementing APIs to support buffered haptics as exposed by the Oculus SDK.
Keywords: feature
OS: Unspecified → Windows
Priority: -- → P3
Hardware: Unspecified → x86_64
Whiteboard: [gfx-noted]
Whiteboard: [gfx-noted] → [gfx-noted][webvr]
Component: Graphics → WebVR
Assignee: nobody → dmu
According Oculus SDK doc, https://developer3.oculus.com/doc/1.10-libovr/_o_v_r___c_a_p_i_8h.html#a4d519fe78e976e31010e0510894276ff,

ovrResult ovr_SetControllerVibration()

Sets constant vibration (with specified frequency and amplitude) to a controller, and vibration lasts for a maximum of 2.5 seconds.

Non-Buffered Haptics
Vibration can be enabled by calling ovr_SetControllerVibration:

ovr_SetControllerVibration( Hmd, ovrControllerType_LTouch, freq, trigger);
Vibration is enabled by specifying the frequency. Specifying 0.0f will vibrate at 160Hz. Specifying 1.0f will vibrate at 320Hz.
frequency. Supported values are: 0.0 (disabled), 0.5 and 1.0. Non valid values will be clamped.
I have tried it in a few days but can't get the vibrate response from ovr_SetControllerVibration(). However, the demo from Oculus runs fairly. Probably, I need to check whether the Oculus SDK has been updated totally. Or, Is it only allowed be run at the main thread?
(In reply to Daosheng Mu[:daoshengmu] from comment #1)
> According Oculus SDK doc,
> https://developer3.oculus.com/doc/1.10-libovr/_o_v_r___c_a_p_i_8h.
> html#a4d519fe78e976e31010e0510894276ff,
> 
> ovrResult ovr_SetControllerVibration()
> 
> Sets constant vibration (with specified frequency and amplitude) to a
> controller, and vibration lasts for a maximum of 2.5 seconds.
> 
> Non-Buffered Haptics
> Vibration can be enabled by calling ovr_SetControllerVibration:
> 
> ovr_SetControllerVibration( Hmd, ovrControllerType_LTouch, freq, trigger);
> Vibration is enabled by specifying the frequency. Specifying 0.0f will
> vibrate at 160Hz. Specifying 1.0f will vibrate at 320Hz.
> frequency. Supported values are: 0.0 (disabled), 0.5 and 1.0. Non valid
> values will be clamped.

Here mentions "Vibration is enabled by specifying the frequency. Specifying 0.0f will vibrate at 160Hz. Specifying 1.0f will vibrate at 320Hz."

https://developer3.oculus.com/documentation/pcsdk/1.10/concepts/dg-input-touch-haptic/
Comment on attachment 8852400 [details]
Bug 1305892 - Support Oculus Touch Haptic Feedback;

https://reviewboard.mozilla.org/r/124652/#review127206

This LGTM.
Attachment #8852400 - Flags: review?(kgilbert) → review+
(In reply to Daosheng Mu[:daoshengmu] from comment #2)
> I have tried it in a few days but can't get the vibrate response from
> ovr_SetControllerVibration(). However, the demo from Oculus runs fairly.
> Probably, I need to check whether the Oculus SDK has been updated totally.
> Or, Is it only allowed be run at the main thread?

This is because Oculus only responses the vibration in the presenting mode. It is different from OpenVR vibration. Interesting!
Pushed by dmu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6ade262f9655
Support Oculus Touch Haptic Feedback; r=kip
https://hg.mozilla.org/mozilla-central/rev/6ade262f9655
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: