Hi Guys,
I am working two stereo cameras mode for Durovis Dive, currently is scceed to create two cameras work normally at Phone by modifying background video access example. (show as attached figure 1)
My ARCamera update projection code:
ScreenOrientation orientation = qcarBehaviour.GetSurfaceOrientation(); Rect mViewportRect = qcarBehaviour.GetViewportRectangle(); Camera camera = qcarBehaviour.camera; Matrix4x4 projectionMatrix = QCARUnity.GetProjectionGL(camera.nearClipPlane, camera.farClipPlane, orientation); Matrix4x4 projectionLR = projectionMatrix; if(mViewportRect.width != (Screen.width*0.5f)) { float viewportDistortLR = mViewportRect.width / (Screen.width*0.5f); projectionLR[0] *= viewportDistortLR; } if (mViewportRect.height != Screen.height) { float viewportDistort = mViewportRect.height / (Screen.height); projectionLR[5] *= viewportDistort; } if(mLeftCamera == null) { mLeftCamera = GameObject.Find("LeftARCamera"); } if(mRightCamera == null) { mRightCamera = GameObject.Find("RighARCamera"); } if(mLeftCamera != null) { mLeftCamera.camera.projectionMatrix = projectionLR; } if(mRightCamera != null) { mRightCamera.camera.projectionMatrix = projectionLR; }
But the screen is be adjusted to the horizontal autographic size, so I changed the ShouldFitWidth return value directly to false. However, everything is fine, just ARCamera is not work expectedly show as attached. I had tried orginal background video access exmaple, still have same problem. Dose anyone know about this? Thanks for your kind assistance.
Pic01: https://drive.google.com/file/d/0B761p2cWCZ36X280c2Z6enkzUkU/edit?usp=sharing
Pic02 (problem): https://drive.google.com/file/d/0B761p2cWCZ36Z1g5ZjNfOEtxbjA/edit?usp=sharing
Im trying to drive your same setup ! this guy knows how to do:
https://www.youtube.com/watch?v=jUdW1Iy7EqY
Did you fix already ? thank you.