Page 1 of 1

How to disable the Web VR

Posted: Wed Dec 06, 2017 2:54 am
by asfo
Hi everyone,

I have a project and is already working in an amazing way in my PC, but in my smartphone works so bad, I'm using moto x play and the gyroscope is not part of it, so it vibrates like crazy and I can't move around or do anything.

So I'm looking for disabling the VR by default. I read about the ViewManager and the method disableVR() but I don't know how to use it since is not clear to me ...

Hope someone can help me, thanks in advice!

Re: How to disable the Web VR

Posted: Thu Dec 07, 2017 9:30 am
by rroux
Hello,

Is your question is : How to disable the Gyro controller ?

Have a nice day :)

Re: How to disable the Web VR

Posted: Thu Dec 07, 2017 4:36 pm
by asfo
Sorry I'm really new to this, but basically this happens...

I open the site in my PC, then I can move around with the mouse/keys, but when I open it in my smartphone (Android) it vibrates like a crazy, and I think yes, is the gyroscope which is not there (Moto X Play) ...

So what I want is to move with the mouse/touch screen instead of the gyroscope in all the smartphones and pcs by default (or any device in general)

Re: How to disable the Web VR

Posted: Fri Dec 08, 2017 10:11 am
by rroux
Hey asfo,

So you need to explicit the controllers in your json configuration.
To do that, you have to add the following object at the root of your json configuration

  1. "controllers":
  2. {
  3.         "instances":
  4.         [
  5.             {
  6.                 "uid": "gyroscope-controller",
  7.                 "type": "gyroscope",
  8.                 "enabled": false
  9.             },
  10.  
  11.             {
  12.                 "uid": "pointer-controller",
  13.                 "type": "pointer",
  14.                 "enabled": true
  15.             }
  16.         ]
  17. },


Hope this helps !

Re: How to disable the Web VR

Posted: Fri Dec 08, 2017 4:31 pm
by asfo
:D Thanks! it worked! ...