Xipherx Posted September 13, 2017 Share Posted September 13, 2017 Hi All, I'm updating from Babylon 2.4 my project that simulate a 360 static scene with a WebVRFreeCamera and a cube with images as Textures on each side. In 2.4 I used "trackPosition: false" in WebVROptions to not consider HTCVive position but only rotation, but in Babylon 3.0 doesn't work anymore. Can anybody help me? Thanks in advance! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 13, 2017 Share Posted September 13, 2017 ping @RaananW Quote Link to comment Share on other sites More sharing options...
RaananW Posted September 13, 2017 Share Posted September 13, 2017 Hi @Xipherx, That's a wonderful question, that I guess many will have when they start working with WebVR. Due to the nature of WebVR, the entire transformation of the headset is submitted to the scene. It is actually very important to keep the entire transformation tracking, as it prevents the motion sickness that is sadly a part of VR experiences (when implemented wrong). Since we moved to WebVR 1.1, we are obligated to use the transformation provided by the headset, as we are using the view and projection matrix of the VR device itself. We have no control over the position anymore, and therefore trackPoisition doesn't work anymore. We do however update the camera's position using the variable devicePosition, which is a Vector3. But worry not, as there are workarounds. You will have to implement them yourself, but it shouldn't be a big problem. The best two ways (that I can think of) use the parent system of Babylon: 1) set the camera's parent to be an invisible mesh and set its position to be the negative of camera.devicePosition 2) Set the entire world in a container, and move this container together with the camera. A very quick demo for 1 can be found here - https://www.babylonjs-playground.com/#5MV04#38 It is not too stable and needs to be improved, but this would be the basic starting point for you. GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Xipherx Posted September 14, 2017 Author Share Posted September 14, 2017 I see, thank you very much! 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.