HTC Vive controllers stopped working?

Hi all. Sorry for all these WebVR questions. I’m struggling to get vrExperienceHelper working on a broad range of devices.

Right now my trouble is with the HTC Vive controllers on Windows 10, Firefox 69.0, and SteamVR 1.7.15. I have successfully used the controllers in the past (amazing experience). But I can no longer get BabylonJS to recognize them. The navigation sphere only appears where I’m looking (and then only if vrHelper.enableGazeEvenWhenNoPointerLock = true), not where I’m pointing with the controllers. And the controller mesh isn’t visible. Here’s a playground: https://playground.babylonjs.com//#TAFSN0#297

When I use the Oculus Go, on the other hand, I can get the controllers to work. But only if I press the Oculus button and then the “Resume” icon. Even on Oculus Go, the controllers don’t work without this trick.

As always, thanks for your help with this.

Pinging the VR master @RaananW. Thanks.

Hey, this is new.
Have you tried with other browsers? And with an older version of Babylon? Does it happen since a certain update?

Just a followup - i just tested with mixed reality with the newest steam/firefox and I get this -

. Also tested with the oculus quest which was working as expected.

Pay attention that your scene is initializing the controllers twice - which is not needed. Try this - https://playground.babylonjs.com//#TAFSN0#299 or this - https://www.babylonjs-playground.com/#ZHYP5K#22 , they seem to be working correctly for me.

If it is still an issue, please let me know. also, if you see any error in the console it would be wonderful to have it. sadly I cannot reproduce this bug…

1 Like

Hi @RaananW. Much thanks for your help with this. I’ve continued to experiment with your updated https://playground.babylonjs.com//#TAFSN0#299 scene. Here’s what I’ve found:

  1. I restarted the computer (multiple times). That did not fix the problem.
  2. There was a recent SteamVR update. I wonder if that’s the culprit?
  3. I discovered that the controllers do work in Firefox if I turn on BOTH of the controllers. Let me describe my tests in case it helps with debugging:
    • When I enter VR with both controllers turned off, it tracks where I’m staring (perfect).
    • When I enter VR with one controller already turned on, it does not pick up on the controller (still tracks where I’m staring).
    • When I enter VR and then turn on one controller (while in VR), it still does not pick up on the controller.
    • But when I enter VR and turn on BOTH controllers, both track fine! There’s something about turning on the second controller that makes both controllers detectable. It also works fine when I enter VR with both controllers already turned on.
    • Once I’ve got both controllers working, I can turn off one of them, and the other still tracks. My app only requires one controller, so this is what I’d prefer.
  4. I have similar problems when I use BabylonJS 4.03 and 3.3 in the playground.
  5. There are no errors in the JavaScript console.

I also discovered that in Google Chrome, I can use only one controller if it is turned on at the time I enter VR. If I turn it on after entering VR, it does not appear.

Thanks much for your attention to this. I really appreciate it.

2 Likes

Thought I’d post an update here, in case it helps anyone else. I tested the controllers on a separate computer, with a separate HTC Vive headset, and was able to reproduce the problem there. So I don’t think it’s a problem with my hardware.

I then visited one of the A-Frame demo pages, and I saw the exact same problem there. So I’m guessing this issue is related to a WebVR implementation limitation, not something specific to BabylonJS.

Thanks.

I haven’t used vive for quite some time, but - when I did have a vive in my studio i remember you needed to press the side buttons to get them to identify as gamepads (and thus webvr controllers). It is still the case with many other headsets (even the oculus touch). Might be the case?

Hi @RaananW. I tried pressing the buttons on the side of the Vive as you suggested, but it didn’t change the behavior. Anyway, I’m more convinced than ever that this is a WebVR or perhaps SteamVR thing (not a BabylonJS thing) because I also see the same behavior with A-Frame: A-Frame Super Hands Component - 6DOF With Physics (i.e., it only works if I turn on both the controllers).

My issue with the Oculus Go does appear to be BabylonJS specific, though. For example, when I visit A-Frame Super Hands Component - Pointer Controls and click the VR icon, it immediately recognizes the Oculus Go controller. But when I do the same for https://playground.babylonjs.com/#TAFSN0#299 , the controller mesh loads, but it doesn’t track the controller’s motions. It only works if I press the Oculus Button and then press “Resume.” Is there perhaps something more I need to add to the playground scene to make it recognize the controller?

On another note, is there a good way to acknowledge the BabylonJS community in a scientific paper? I’m about to publish some molecular visualization software that uses BabylonJS, and it would be great to acknowledge the help of folks like you, @Deltakosh, and @trevordev. Thanks for everything.

I will see what I can do about it!
My assumption is this - It seems to me like the gamepad API only initializes when you press the button. Maybe there is a workaround. Will check.

Good question! I (and I am sure - we) will be honored. Well, you can always mention us, but apart from that I don’t know know what is usually done. What would be the best way from your side?

1 Like

Hi @RaananW. Thanks for your help with this. Re. the acknowledgement, normally to include someone in a paper’s acknowledgements section I just need his or her permission. I could try acknowledging you as “@RaananW” if you prefer (though the editors might object), but it would probably be more professional to use your actual name. Is that alright?

I’ll ping @Deltakosh and @trevordev too, to see if they’re ok being acknowledged and if I can use their actual names.

Thanks!

I will be honored. My real name is David Catuhe:) Please ping us when your paper will be out :slight_smile: (If there is a way to read it of course)

1 Like

Perfect. Thanks for all your help, @Deltakosh and @RaananW!

1 Like

Hi @RaananW. Just wanted to follow up re. checking to see how the Oculus Go initiates the gamepad API. Just to clarify, it’s not that it only works when you press the button. It’s that I have to exit out of VR (using the Oculus menu button) and then press the Resume button to return to the browser.

Is there a way to detect whether the gamepad API has been initialized and, if not, to initialize it programmatically? I’m wondering if I could use a setTimeout to check if it has been automatically initiated 5 seconds after entering VR mode, and then to programmatically initialize it if it hasn’t been.

Thanks for all your help.

Hi Jacob,

Sorry for a late reply.

I ran a few tests with the VR controllers in the quest and have noticed that most of the time, it is working as you would expect it - the controllers are automatically added. But it takes time for the models to load. I do get the direction line from the controllers initialized automatically.
Having said that - from time to time they are not visible. I am still working on the event coordination in order to make sure that if a gamepad object already exists during VR initialization it will be added automatically.
So sorry that I don’t have a better answer at the moment, but I haven’t forgot and am trying to find a fix for it.

1 Like

Hi @RaananW. Much thanks for your continued help with this. No worries at all about the delay. It seriously blows my mind that you guys are able to stay on top of so many forum postings. :slight_smile:

Would you mind sharing the playground scene you’re using for testing? When I’ve tried to get this working on the playground (e.g., https://playground.babylonjs.com/#TAFSN0#299), the controllers never load automatically (only if I press the Oculus button and then “Resume”). But I’m using an Oculus Go, not an Oculus Quest. Perhaps that’s the problem?

Thanks again.

Hi @Deltakosh . Wanted to let you know that my article was published in PLOS Computational Biology. Thanks again for all your help! I mentioned you in the Acknowledgements section. Take care.

4 Likes

Was your controller problem ever resolved?
I remember them being similarly finicky with the two controllers on my Quest. I dismissed it at the time as part my own incomplete implementation, noting the different browsers also behaved inconsistently. Haven’t played with it in a while though, might ought to get back in there.

Also very cool project. I’ve been considering this use since learning to decipher those hexagonal carbon biology molecule diagrams as 3d structures. I’ll have to read past the abstract

Thanks a ton!! pinging @PirateJC and @thomlucc for awareness

3 Likes

Hi @withADoveInOneHand. I’m pretty sure the issue was resolved when I switched the app over to WebXR. I don’t think I ever did get it to work with WebVR. All the best.

1 Like