ian Posted July 5, 2017 Share Posted July 5, 2017 Can anybody explain what is difference between WebVRFreeCamera vs VRDeviceOrientationFreeCamera Why should we use WebVRFreeCamera? Greetings Ian Quote Link to comment Share on other sites More sharing options...
ian Posted July 5, 2017 Author Share Posted July 5, 2017 https://doc.babylonjs.com/overviews/webvr_camera I get error in chrome/firefox/opera browser ( I have those browsers lattest stable versions): if I type in browser console command : or command: navigator.getVRDevices()output: navigator.getVRDevices() VM133:1 Uncaught TypeError: navigator.getVRDevices is not a function at <anonymous>:1:11 -------------------------------- command: navigator.getVRDevices().then((vrs) => {console.log(vrs.length)})output: Uncaught TypeError: navigator.getVRDevices is not a function at <anonymous>:1:11 Quote Link to comment Share on other sites More sharing options...
ian Posted July 5, 2017 Author Share Posted July 5, 2017 OK I SOLVE. If you want to use WebVR (Browser which support VR (with javascript navigator.getVRDevices()) (MOBILE for CarbonVR) or just Mobile (If you dont have VR DEVICE/GOOGLES) FOR ANDROID You have to download "Chrome Canary (Unstable)" and then In the URL bar, load chrome://flags#enable-webvr and toggle the Enable WebVR flag. (here: https://webvr.rocks/chrome_for_android) after that you restar chrome canary and Babylon WebVR works (left/right side). (so only so WebVRFreeCameraID works OK else browser not supporter.... to new..) Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 6, 2017 Share Posted July 6, 2017 THanks for the feedback Quote Link to comment Share on other sites More sharing options...
davrous Posted July 6, 2017 Share Posted July 6, 2017 WebVRFreeCamera is using the WebVR specification available in Edge Creators Update, Firefox 55 and some specific build of Chromium. It's also available on Gear VR and DayDream. It better address WebVR devices and also expose gamepad extesion to use the VR controllers. VRDeviceOrientationFreeCamera is a fallback camera based on the Device Orientation API. It mimics a bit the WebVR one using the accelerometer of the smartphone and doing a double rendering of the scene with lens distortion handled (can be disabled). You need to feature detect WebVR in your code to use either WebVR or Device Orientation. Here's a sample showing the best practice to use (using Sponza as a demo): http://playground.babylonjs.com/#QWIJYE#1 ian 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.