Forum Discussion
ezRocket
11 years agoProtege
Switching between Rift cameras + working example
Edit: Below is my original post. It has since then been solved. Here's a working example. I have been trying to find a way to switch between two Rift cameras and have yet to find something that wor...
drash
11 years agoHeroic Explorer
Your solution sounds like it will kill performance for your overhead view at some point -- it's still rendering the main camera underneath even if you're not seeing it.
What if you try "disabling current -> enabling other" in both cases? I've run into this issue as well (starting a few SDK updates ago), but was hoping it was no longer an issue in 0.4.3. My workaround at the time was to deactivate before activating, like this:
If that doesn't help, maybe try moving the OVRManager out of those prefabs and just have one active one in your scene at all times. I haven't tried this first-hand since I ended up just moving a single camera controller/rig through the scene, re-positioning and re-parenting as needed, so I'm curious to know if you get this to work.
What if you try "disabling current -> enabling other" in both cases? I've run into this issue as well (starting a few SDK updates ago), but was hoping it was no longer an issue in 0.4.3. My workaround at the time was to deactivate before activating, like this:
if (Input.GetKeyDown(KeyCode.C)) {
cam2.SetActive(false);
cam1.SetActive(true);
}
if (Input.GetKeyDown(KeyCode.V)) {
cam1.SetActive(false);
cam2.SetActive(true);
}
If that doesn't help, maybe try moving the OVRManager out of those prefabs and just have one active one in your scene at all times. I haven't tried this first-hand since I ended up just moving a single camera controller/rig through the scene, re-positioning and re-parenting as needed, so I'm curious to know if you get this to work.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 3 months ago
- 1 year ago
- 2 years ago