Open JohnAlcatraz opened 6 years ago
We just stumbled upon this issue for a Unity-based game which makes use of simultaneous haptics in both controllers. While it works fine for the HTC/Vive controllers on SteamVR, the Touch haptics are spotty and unreliable. Using the Oculus SDK directly instead of SteamVR produces the expected results.
This is actually a showstopper for us for using SteamVR / releasing the game on SteamVR for Oculus, since the feedback on both hands at the same time is crucial to the gameplay mechanics. As it works on the Oculus SDK I am fairly certain that the issue is inside the SteamVR layer on top.
@JohnAlcatraz Did you resolve this issue somehow, i.e. is there a workaround for this?
@JoeLudwig Is this issue on your agenda, i.e. will there be continued support for Oculus on the SteamVR SDK? It would be great to get a response on this.
Thanks,
Philip (sourcenity.com)
This one is a major issue, it really needs someone to take a look. It can be seen in The Lab on anything that fires haptics on both hands, like the bow.
@JohnAlcatraz They finally fixed it!
Changed SteamVR haptic calls into the Oculus SDK to work around some issues with simultaneous haptics from multiple controllers.
I'm not sure I exactly experienced the bug but I added some 0s as padding and it didn't do any harm.
Does it seem better to you?
I just tried the bow in The Lab and it does seem fixed, however I tried without the SteamVR beta and it seemed ok there as well now. It may be that Oculus put out their own fix at some point recently, since this was really an Oculus bug that everyone had to work around. They haven't updated the forum thread linked above if so.
I'll try some tests in UE4 too when I get a chance, but I had been able to reproduce using The Lab in the past.
@JoeLudwig I tested with UE4 today and it still seems to be broken on both the Beta and production branches. So it seems possible The Lab using it's own workaround by interleaving the events to left and right across frames or something.
In UE4 if you play this force feedback effect with Oculus via SteamVR both hands will only do an extremely short pulse and then both stay silent:
But if you turn off the right hand and play it, it will play constantly in the left hand for the full 45 seconds:
Things work fine for both hands on Vive and WMR.
@JoeLudwig I added logging of UE4's calls to TriggerHapticPulse, unix timestamp on left. Changed duration to .5s to make logs managable.
With both hands it results in a very short impulse on both hands, and then nothing:
LogSteamVRController: 16806212.249986 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.250320 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.260324 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.260644 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.272516 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.272852 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.281582 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.281920 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.294028 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.294497 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.305396 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.305718 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.315485 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.315830 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.326957 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.327276 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.339132 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.339588 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.349063 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.349400 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.362552 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.362905 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.371319 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.371653 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.383313 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.383661 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.392735 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.393060 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.405706 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.406026 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.415185 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.415528 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.427548 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.427973 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.437226 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.437756 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.450839 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.451209 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.459978 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.460381 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.472207 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.472536 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.482081 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.482426 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.494972 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.495398 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.504233 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.504820 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.516939 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.517256 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.526554 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.526876 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.538671 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.538994 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.549721 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.550045 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.560048 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.560397 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.570920 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.571289 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.583619 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.583947 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.593083 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.593418 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.604833 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.605170 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.616387 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.616707 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.626455 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.626771 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.637491 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.637809 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.650074 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.650557 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.659689 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.660035 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.670921 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.671269 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.683299 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.683631 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.692700 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.693401 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.705184 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.705568 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.715049 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.715393 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.727572 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.727942 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.737455 TriggerHapticPulse: unControllerDeviceIndex 3, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806212.737854 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
With left hand or right hand only, it does a strong effect for the full .5s:
LogSteamVRController: 16806453.222325 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.234733 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.244473 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.255243 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.267685 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.277591 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.290209 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.300168 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.311858 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.321933 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.332945 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.345750 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.357653 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.366841 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.378836 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.389085 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.401906 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.410642 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.422192 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.434189 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.446192 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.455431 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.467973 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.478230 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.490012 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.500224 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.511515 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.523200 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.532876 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.545783 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.557562 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.568346 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.577279 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.590568 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.599544 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.612328 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.621757 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.634298 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.644637 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.656803 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.668575 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.677643 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.688763 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.701915 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
LogSteamVRController: 16806453.711079 TriggerHapticPulse: unControllerDeviceIndex 4, unAxisId 0, usDurationMicroSec 2000
UE4 seems to call into it once per frame per hand (11ms). To get usDurationMicroSec it takes the intensity from curve in earlier screenshot and multiplies by 2000, then clamps between 0 and 2000. I logged the values with what was sent to TriggerHapticPulse, after that clamping had been done.
(done on the Beta Branch of SteamVR)
It turns out I forgot to push the button to actually ship the build. That just happened. Can you try again?
Awesome, I tried again with the update and both controllers are simultaneously pulsing for the full duration now.
Haptics for one controller at a time are working fine with the Oculus Touch controllers, but when trying to trigger haptic pulses on both controllers simultaneously, there are no haptics at all. With the Vive controllers both controllers vibrate correctly, so this is definitely a bug with how OpenVR treats the Oculus Touch controllers.
It is likely related to this issue issue in the Oculus SDK that wasn't fixed yet it seems: https://forums.oculus.com/developer/discussion/48718/weird-issue-when-using-haptics-on-both-touch-controllers They mention a workaround there, so OpenVR should have that workaround in mind when sending commands to the Oculus Touch controllers.
Here I found someone mentioning the issue on the Unity forums: https://forum.unity.com/threads/oculus-touch-haptics-bug-in-steamvr.496815/
It's not related to Unity though, I am using UE4 with openvr. It is IVRSystem::TriggerHapticPulse that's not working correctly for Oculus Touch controllers. It is definitely not wanted that the same code leads to making both Vive controllers vibrate and not make Oculus Touch controllers vibrate at all.