Jose Vicente Posted October 25, 2018 Share Posted October 25, 2018 Hello. I've a scene in which I use ArcRotateCamera and also VR is enabled using VRExperienceHelper. The problem is that, when the user enters to VR, VR camera is not looking at the same position that is looking Non-VR Camera and also is further. I've tried to handle onEnteringVR event,but I'm not able to make it work. I've prepared to simple examples to illustrate the problem. In this sample, without moving/rotation the camera, if the user enters in VR, is looking to the sphere, which is OK, but it is further from the sphere, which is not OK. However, in this sample, if the user enters in VR without moving the camera, is looking to the sphere opposite side, and also the position is wrong. Any ideas to help to put the correct position/orientation in the VR camera when entering to VR? Thanks in advance. Regards. Quote Link to comment Share on other sites More sharing options...
Dieterich Posted October 25, 2018 Share Posted October 25, 2018 Verify this: vrHelper.vrDeviceOrientationCamera.cameraDirection = new BABYLON.Vector3(0,1,-5); Quote Link to comment Share on other sites More sharing options...
bghgary Posted October 25, 2018 Share Posted October 25, 2018 ping @trevordev Quote Link to comment Share on other sites More sharing options...
trevordev Posted October 25, 2018 Share Posted October 25, 2018 Yea, it looks like the code only updates position at the moment. Fixed with this PR: https://github.com/BabylonJS/Babylon.js/pull/5426 . Let me know if you still observe issues. Quote Link to comment Share on other sites More sharing options...
ffrechina Posted October 26, 2018 Share Posted October 26, 2018 is the change ready in the playground? I ask because the same problem described above still happening in the babylon playground Quote Link to comment Share on other sites More sharing options...
Guest Posted October 26, 2018 Share Posted October 26, 2018 Should be live in 10 minutes Quote Link to comment Share on other sites More sharing options...
ffrechina Posted October 29, 2018 Share Posted October 29, 2018 Now I see the correct orientation but I still see the sphere further when entering in VR Quote Link to comment Share on other sites More sharing options...
ffrechina Posted October 29, 2018 Share Posted October 29, 2018 You can see in this sample that the problem is not fixed. Move the ball, go VR, move again the ball, and enter again to VR. You will see how the camera is going crazy. And also, the camera is further. Here a video Quote Link to comment Share on other sites More sharing options...
ffrechina Posted October 30, 2018 Share Posted October 30, 2018 any help with this please? Thank you! Quote Link to comment Share on other sites More sharing options...
trevordev Posted October 30, 2018 Share Posted October 30, 2018 Sorry about that. Created this additional PR https://github.com/BabylonJS/Babylon.js/pull/5438 It appears the angular drag events were not disabled when in VR. That jolted rotation when entering/exiting should be fixed now. As for the camera being further away, it looks like the position of the camera is the same, I think it looks further due to the viewport/distortion change, hopefully this is ok for your scenario. Quote Link to comment Share on other sites More sharing options...
ffrechina Posted October 31, 2018 Share Posted October 31, 2018 Thank you @trevordev! It looks like now it works. With respect to "it looks further", it is important in my scenario. Do you know any way to get the aparently same distance from the object in 3D and VR? Thank your again Quote Link to comment Share on other sites More sharing options...
trevordev Posted October 31, 2018 Share Posted October 31, 2018 @ffrechina What vr device are you using or are you running only in a browser? Do you feel you are further away when you enter VR with a headset on? To me only when using the fallback camera do I see what you are seeing which uses specific camera distortion for gear vr, I could add a property to the helper to disable that camera so in chrome if you enter vr without an hmd it will just go fullscreen. Quote Link to comment Share on other sites More sharing options...
ffrechina Posted November 6, 2018 Share Posted November 6, 2018 Hi @trevordev. That's true. If I use the vr device, it works as expected. Thank you so much! GameMonetize and trevordev 2 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.