dataarts / dat.guiVR

A flexible graphical user interface for changing variables within WebVR.
https://workshop.chromeexperiments.com/examples/guiVR/
Apache License 2.0
311 stars 50 forks source link

Events & tight binding to THREE.ViveController (or ability to prevent bindViveController) #89

Open patricknelson opened 6 years ago

patricknelson commented 6 years ago

Unfortunately there's already another controller out in the wild that's getting some use that happens to unfortunately use the same name as the original THREE.ViveController demo code: https://github.com/msfeldstein/three-vive-controller

So far I've been able to workaround this issue by allowing it to proceed with binding but simply adding getGamepad() to my own extension of that class like so:

    getGamepad() {
        return navigator.getGamepads()[this.controllerId]
    }

The only issue now for me is that I cannot disable my own laser pointer without some rigmarole (or duplication of code that's already running). I'll submit another issue for that since I think that should be separate.

patricknelson commented 6 years ago

Following up: I just realized I could use guiInput.visible to resolve the conflict between my existing laser and the one setup by dat.guiVR 👍