WebVR-Extension icon indicating copy to clipboard operation
WebVR-Extension copied to clipboard

Provisional Gamepad Support

Open lollerbus opened this issue 9 years ago • 1 comments

Hi @spite,

First off, fantastic work! I hope I'm not stepping on your toes, but I was considering adding an emulated HTC Vive controller in a fashion similar to your monkey-patching of navigator.getVRDisplays. Initially just something simple in terms of being able to position/orient it in space and depress buttons. Should I get something functional in a PR in order to discuss further?

Thanks, lollerbus

lollerbus avatar Jun 30 '16 23:06 lollerbus

Yes! It would work similarly, but for navigator.getGamepads() (and all the related methods, objects, events...)

To begin with, exposing two "controller-like" boxes that can get a pose like the hmd, and attach the TransformControls. Then it might make sense to refactor the code so it can be generalised for hmd, controllers ... and anything else that might come in the future.

Do you have any thoughts about how to handle buttons and touchpads?

Also, it might be interesting to not override all gamepads, in case a developer is also using a standard gamepad for whatever reason.

spite avatar Jun 30 '16 23:06 spite