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...
ezRocket
11 years agoProtege
New post to keep it seperate from the OP.
Okay, after going through various threads, I'm just gonna use this for now:
It's stupidly simple but seems to be the best workaround at the moment.
Basically what it does or what happens:
The main camera stays enabled, it's just the secondary camera that is toggled.
For this to work, your secondary camera must be higher in the hierarchy than the main camera.
And... that's it really.
Okay, after going through various threads, I'm just gonna use this for now:
#pragma strict
public var ovrcam1 : GameObject;
public var overheadcam : GameObject;
var isoverheadcam : boolean;
function Start () {}
function Update () {
if (Input.GetKeyDown(KeyCode.C))
{
if (!isoverheadcam)
{
isoverheadcam = true;
overheadcam.SetActive(true);
} else if(isoverheadcam)
{
// set the main cam as true, just in case something messed up or it got disabled somehow
ovrcam1.SetActive(true);
overheadcam.SetActive(false);
isoverheadcam=false;
}
}
}
It's stupidly simple but seems to be the best workaround at the moment.
Basically what it does or what happens:
The main camera stays enabled, it's just the secondary camera that is toggled.
For this to work, your secondary camera must be higher in the hierarchy than the main camera.
And... that's it really.
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