Jump to content

How To Prevent VR Camera From Stretching On Window Resize?


nikokoneko
 Share

Recommended Posts

Hi,
I noticed a problem with VRDeviceOrientationFreeCamera:  when the window is resized, the content displayed by rig cameras get stretched. It looks exactly the same as when using one camera without calling engine.resize().

I am aware of this post, but I don't use distortion correction, hence there is no post process.

I see that it has to do with metrics vResolution, but I don't know if I can update metrics after camera is created and force changes. I messed around with it, without success:

http://www.babylonjs-playground.com/#W1NP4#0

Probably one workaround would be to call setCameraRigMode() for each window resize, but that seems terribly wasteful, as lots of new objects are being created (and destroyed).

Any help much appreciated!

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