Switch between OVRCameraControllers
Hi,
in my project I have 2 OVRCameraControllers (well the CamController is attached to a GameObject) between which I would like to switch.
This is basically pretty straight forward:
where
When I start the app, everything is rendered fine. I hit the head-button and it switches to the second OVRCameraController and the image is rendered as expected.
Now, when I hit the other head-button to switch back onto the first cam, the image freezes. It shows the last image of the second cam. Apparently nothing is rendered to the screen anymore.
In the scene view I can clearly see that the camera view is rotated via the HMD.
The OVCCameraController generates a camera which is used to render the image. The clear flags are set to don't clear. When the image is "frozen" and I change the clear flag from "don't clear" to "Skybox" the background get's drawn...
So it's not an application freeze and it's not a controller freeze...
The left/right eye cameras (their preview) still show's the updated image... so perhaps it's a lost render target? Or a stopped coroutine of the OVRCamera?
Has anyone tried such a 2 OVRCameraController setup and already solved this problem?
Thanks for suggestions and help :)
in my project I have 2 OVRCameraControllers (well the CamController is attached to a GameObject) between which I would like to switch.
This is basically pretty straight forward:
if (Input.GetButtonDown("HeadButtonRight"))
{
if (!useInsideCamera)
{
useInsideCamera = true;
outsideCamera.SetActive(false);
insideCamera.SetActive(true);
if (freecam != null)
{
freecam.enabled = false;
}
}
}
if (Input.GetButtonDown("HeadButtonLeft"))
{
if (useInsideCamera)
{
useInsideCamera = false;
insideCamera.SetActive(false);
outsideCamera.SetActive(true);
}
}
where
public GameObject insideCamera;
public GameObject outsideCamera;
When I start the app, everything is rendered fine. I hit the head-button and it switches to the second OVRCameraController and the image is rendered as expected.
Now, when I hit the other head-button to switch back onto the first cam, the image freezes. It shows the last image of the second cam. Apparently nothing is rendered to the screen anymore.
In the scene view I can clearly see that the camera view is rotated via the HMD.
The OVCCameraController generates a camera which is used to render the image. The clear flags are set to don't clear. When the image is "frozen" and I change the clear flag from "don't clear" to "Skybox" the background get's drawn...
So it's not an application freeze and it's not a controller freeze...
The left/right eye cameras (their preview) still show's the updated image... so perhaps it's a lost render target? Or a stopped coroutine of the OVRCamera?
Has anyone tried such a 2 OVRCameraController setup and already solved this problem?
Thanks for suggestions and help :)
