Jump to content

How to render second view port in VR Camera in both sides


MrVR
 Share

Recommended Posts

Hi Guys I was wondering if is posible to have two vew ports in the two sides of the VR camera. @MackeyK24 let me know if you know the answer please

 

let myCamera: BABYLON.FreeCamera = new BABYLON.VRDeviceOrientationFreeCamera("FreeCamera", new BABYLON.Vector3(0, 0, 0), this.scene);
            this.scene.activeCamera.position, this.scene);
            myCamera.attachControl(this.engine.getRenderingCanvas());       
            this.scene.activeCameras.push(myCamera);
            this.scene.activeCameras.push(this.scene.activeCamera);
            this.scene.activeCamera.viewport = new BABYLON.Viewport(0, 0, 0.5, 1.0);            
            myCamera.viewport = new BABYLON.Viewport(0.2, 0, 0.2,0.5);

I only get this in one side of the left lens  viewport.JPG.2693a83ea2eb658f6a040c12844fa56a.JPG do I have to create a third one , I need to have a camera view port inside  my vr camera if any body knows how to do it it would be appreciated.

 

thanks 

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