[VR] OpenXR and WindowsMixedReality Haptic Feedback
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 7.8k
- Forks
- 1.2k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 49
Description
Is your feature request related to a problem? Please describe.
Haptic feedback is an essential part of VR games, but Stride does not currently support it well.
Describe the solution you'd like
TouchController should have a vibrate method, similar to the one added to FocusEngine in this commit: https://github.com/phr00t/FocusEngine/commit/bac94b2c7e4b6ea975ebd3e38611e3012746340b. Returning a bool that indicates whether vibration was successfully sent makes sense to me, but that's something to figure out here. The OculusOVR api takes both frequency and amplitude parameters whereas OpenVR works a bit differently, so the exact characteristics of the vibration may have to vary by API.
Describe alternatives you've considered
When using OpenVR you can make the controllers vibrate with Valve.VR.OpenVR.System.TriggerHapticPulse(controllerIndex, 0, amount);, but controllerIndex is a private field of OpenVrTouchController class, so to use it properly Stride needs to be changed.
Additional context
A brief example of the vibrate method usage should be added to the VR section of the manual.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the TouchController and OpenVrTouchController entry points, then compare the requested method with the linked FocusEngine commit. Trace how the OpenVR, OpenXR, and WindowsMixedReality controllers expose haptics and determine the shared behavior and return value. Done means supported controller APIs can trigger vibration and the VR manual includes a brief usage example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- ar-vr-xr, documentation, game-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100