Disconnect Controller

I have an application where i open WebVR to use on an event. It loads both controllers and run normally. When i take the headset (using meta quest 2) from a person to put on another, sometimes the controller reconnects. I noticed everytime it reconnects the vr bugs. Probably have some exception on game causing it, but i cant discover where it is on debug cause i dont know how to force a disconnection of the controller.

Anyone knows how to force it so i can debug my error?

Have you tried turning the controller off?

i managed to find a solution by adb connecting with the oculus quest 2 and removing the bateries to turn it off. Yes. But i would like a code way to turn it off and turn it on. Cause it is really hard to debug this oculus with the real thing. Were i able to disconnect on simulator or by code would make much better way to test and debug for problems

With “my” Oculus 2 when the distance between the headset and the controllers is too big (e.g. 2 meters), the headset loses connection with the controllers. So, try just move the headset away from the controllers, or vice versa.

Add-on: Maybe if you listen to XRInputSourcesChangeEvent it would be possible to track when a controller is lost or added, so you can update the JS object that holds the controller. Another thing to try is to listen to the connected and disconnected events of the WebXRController.

Any update?