Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
adam's avatar
adam
Honored Guest
13 years ago

Bug with multiple OVRCameraControllers?

Hi,

I'm trying to implement multiple camera views for a driving demo (eg. a camera view from inside the cockpit, and one from on top of the car roof).

I am attempting to do this by having 2 OVRCameraControllers in the scene and enabling/disabling the appropriate one in code.

It seems that even though one might be disabled, a mismatch of left/right camera gets rendered. ie the left camera from one controller and the right camera from the other controller.

Has anyone tried something similar with success?

I'm open to other techniques for camera view switching - perhaps use a single camera but change it's location upon appropriate keypress?

Thanks, Adam.

2 Replies

Replies have been turned off for this discussion
  • Have you adjusted the depth values for the secondary cameras? I believe the code targets the cameras based on depth, so if you leave them at the default of 0/1 they will conflict with the original set.

    That said, I don't think the code is setup to support multiple controllers. You may be able to get it working somehow, but it's not necessarily an easy thing. We can look into adding this as a feature at some point, just not sure it's a high priority right now.
  • adam's avatar
    adam
    Honored Guest
    I solved this by adding a new method SetEnabled on the OCRCameraController, which simply sets the enabled property of the 2 cameras it references.

    Now I can have multiple OVRCameraControllers in scene and switch between them.

    Thanks, Adam.