How to disable the Web VR

asfo
Posts: 3
Joined: Wed Dec 06, 2017 2:36 am

How to disable the Web VR

Postby asfo » Wed Dec 06, 2017 2:54 am

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!

User avatar
rroux
ForgeJS Team
Posts: 166
Joined: Wed Oct 26, 2016 12:19 pm

Re: How to disable the Web VR

Postby rroux » Thu Dec 07, 2017 9:30 am

Hello,

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

Have a nice day :)
- Raphaël

asfo
Posts: 3
Joined: Wed Dec 06, 2017 2:36 am

Re: How to disable the Web VR

Postby asfo » Thu Dec 07, 2017 4:36 pm

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)

User avatar
rroux
ForgeJS Team
Posts: 166
Joined: Wed Oct 26, 2016 12:19 pm

Re: How to disable the Web VR

Postby rroux » Fri Dec 08, 2017 10:11 am

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 !
- Raphaël

asfo
Posts: 3
Joined: Wed Dec 06, 2017 2:36 am

Re: How to disable the Web VR

Postby asfo » Fri Dec 08, 2017 4:31 pm

:D Thanks! it worked! ...

Who is online

Users browsing this forum: No registered users and 2 guests