BOLL7708 / OpenVR2Key

Simulates key presses from SteamVR input
137 stars 16 forks source link

Haptic feedback on Meta/Oculus Quest 2 #58

Open Ereiarrus opened 1 year ago

Ereiarrus commented 1 year ago

I am using the Quest 2 over a link cable with OpenXR Runtime set to Oculus (not SteamVR)

The screenshot show my binding - on my left controller, I bound the 'Y' button to RightCtrl + RightShift + F12 (I have no other keybinds); I also ticked 'Do haptic pulse on triggering key'. image

My issue is that when I press the 'Y' button on my left controller, there is no haptic feedback. I have SteamVR open, and the button is definitely triggering correctly: image I have also confirmed it on my discord mute/unmute, which is what I'm using this for.

Am I perhaps misunderstanding what the 'Do haptic pulse on triggering key' does?

Currently, I have to rely on the discord sound to tell me if I'm muted, but I'd rather have that as haptic feedback, so that when I stream, my watchers don't hear the discord mute/unmute sound.

Thanks!

BOLL7708 commented 1 year ago

The haptic feedback sends a short pulse to the controller, I think it's using some old API for this though so it might just be that that has been deprecated and will no longer work. That, or it only works with some controllers. I don't have any Quest so I cannot test the hardware specifically. I'll verify functionality with other hardware when I have time.

Ereiarrus commented 1 year ago

alright, thanks! If you point me in the right direction (where you're making use of the API), I might be able to make some changes and test it out myself! I assume it's in 'TriggerHapticPulseInController' of 'https://github.com/BOLL7708/EasyOpenVR/blob/master/EasyOpenVRSingleton.cs' - you literally say "This has apparently been deprecated, figure out how to do it with the new input system." :D

BOLL7708 commented 1 year ago

Just as a side note, I'm currently moving apartments and hacking away on a different project so if you figure out what to do don't hesitate to do a pull request to the EasyOpenVR project and I'll take a look 😅