Jump to content

VR camera initial position


Jose Vicente
 Share

Recommended Posts

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.

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

@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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...