facebookarchive / react-360

Create amazing 360 and VR content using React
https://facebook.github.io/react-360
Other
8.73k stars 1.23k forks source link

No controllers #11

Closed Fasani closed 7 years ago

Fasani commented 7 years ago

Description

Project works but Vive controllers are not visible. Unsure if this is a bug or not.

Expected behavior

I expect to see my Vive controllers after enabling the game controller flags in chrome. (Perhaps this is enabled so that we are able to use the HMD but not the controllers yet.)

Actual behavior

The controllers are visible in the HTC overlay but disappear when returning to the react-vr demo window.

Windows VR Device:Vive

andrewimm commented 7 years ago

We have not implemented the spatial aspects of controllers, mostly because browser support for the WebVR extensions of the Gamepad API is still very limited. Personally, I have built a demo that interfaces with Vive controllers, but I would like the APIs and support to be more polished before pursuing this in the core of React VR. Ideally within a couple months, Chrome for Android will have support for the Daydream controller, and Chrome Desktop will support both Vive Wands and Oculus Touch controllers, and we will be able to ship support in React VR.

Fasani commented 7 years ago

Ok thanks for the update, add the above as a small side note on the docs so people are aware of the browser limitations. Would be great to see your demo of controllers also.

robeastham commented 7 years ago

Any update on the status of support for Touch or Wands in React VR?

andrewimm commented 7 years ago

@robeastham Support of touch is blocked until browsers actually build against the latest version of the Oculus SDK and add support.

Mozilla task: https://bugzilla.mozilla.org/show_bug.cgi?id=1260558

The experimental Chromium build has some touch support, but it's targeted against an older version of the Oculus SDK, and won't provide a great experience until it's updated.

coding-watermelon commented 7 years ago

Hey there, any news regarding to this feature? :)

andrewimm commented 7 years ago

We have implemented a new controller scheme that allows developers to easily build support for custom controllers like Daydream, Gear VR Controller, Touch, or Vive wands. When this feature ships, we'll be including sample code to demonstrate how you can use these controllers or build your own.

coding-watermelon commented 7 years ago

Wow that was fast! Thanks for the reply. Do you already know when you are going to ship it?

andrewimm commented 7 years ago

All I can say is "soon." Stay tuned!

coding-watermelon commented 7 years ago

As the repository has become open source now, is there already a documentation for the interface you mentioned or do I have to look it up in the code?

andrewimm commented 7 years ago

You can learn about implementing custom cursors here: https://facebook.github.io/react-vr/docs/input.html

I've included a 3dof controller sample (Daydream, Gear VR Controller, etc) at https://github.com/facebook/react-vr/blob/master/Examples/inputs/3dof/ThreeDOFRayCaster.js It demonstrates how to build a more complex raycaster that includes rendering in the virtual world. It can easily be expanded to support 6dof controllers as well. You can also look at https://github.com/OculusVR/ovrui/blob/master/src/Inputs/MouseRayCaster.js, which is the default raycaster used to provide input from mouse, touch events, etc.

In the coming weeks, I'll be releasing more input samples, including grabbable and poke-able components that can be implemented with Touch.

jfaust commented 7 years ago

Any update on this @andrewimm ? Creating a 6dof ray caster was easy, but not having access to the controller pose during input events makes grabbable/poke-able components pretty difficult right now.

esaruoho commented 6 years ago

Question: does React VR 2.0 support the new Gear VR Controller?

andrewimm commented 6 years ago

@esaruoho certainly: https://github.com/facebook/react-vr/tree/master/packages/react-vr-controller-raycaster

timmhayes commented 6 years ago

@andrewimm, Is the react-vr-controller-raycaster supposed to work with the second-gen Google Daydream? I'm testing it ona Samsung Note 8 with Chrome 63 (WebVR enabled) - the code sample you provided imports successfully, but I don't see a controller in VR mode.

timmhayes commented 6 years ago

@andrewimm, a quick follow-up to my question above - my code does show the controller correctly on the Vive. Still doesn't work with the Daydream v2. Thanks

andrewimm commented 6 years ago

@timmhayes the code isn't specific to any controllers. Alongside the creation of the WebVR APIs, the gamepad API has been extended to add controller location and orientation, to support VR-style controllers. The package I linked to uses these APIs to track controller connections, which is why it works equally across Rift, Vive, Gear VR, Daydream (v1), and MSFT mixed reality. I've tested across all of those platforms with no issue. Unfortunately, I don't have a Daydream 2 controller, but there may be some difference in how it's exposed via Chrome Android.

timmhayes commented 6 years ago

Thanks @andrewimm! I just figured out the issue. I had enabled WebVR in chrome://flags, but not the Gamepad Extensions. I changed that setting to Enabled and now the controller works with my Daydream 2. Thanks for the quick and helpful reply.

Shelvadim commented 6 years ago

Hi, Do you have any working simple project example about how to use react-vr-controller-raycaster? I installed this component and changed vr/client.js file, but what to do next to see the beam, i can not understand. Sorry I am new in react-vr. I have Gear VR Controller and i am trying to make it work in react-vr application. I am realy stack here and need help.

Shelvadim commented 6 years ago

Upd. It is ok now. After some tests I found out that react-vr-controller-raycaster works, but Gear VR Controller is only supported now in Samsung Internet Browser inside Oculus. Here the link https://webvr.rocks/ Here is working example of react-vr-controller-raycaster, you can test your controller with different browsers https://shelvadim.github.io/bootstrapsite/video/index.html