Log in or register to post comments

Switching between ARCamera and normal Game Camera

March 5, 2013 - 7:52am #1

Hello,

In Vuforia 1.5  the switching between the ARCamera and the normal Game camera worked for me like this:

 

		Renderer[] rendererComponents = gOC.pongGameObjects.GetComponentsInChildren<Renderer> ();

		// Enable rendering:
		foreach (Renderer component in rendererComponents) {
			component.enabled = true;
		}
		
		gOC.gameCamera.SetActiveRecursively(true);
		gOC.arCamera.SetActiveRecursively(false);

 

Now in Vuforia 2.0, when the ImageTarget currently is found and I want to switch to the normal camera. Then you will see only a blue screen.

But when the ImageTarget has not been found, then it works. So I have to call manually OnTrackingLost(). How can I do that? 

What has changed in Vuforia 2.0?

 

Regards,

Russel

 

Switching between ARCamera and normal Game Camera

March 7, 2013 - 11:50am #5

Glad to see it is solved!

Switching between ARCamera and normal Game Camera

March 7, 2013 - 2:22am #4

I have found the bug :).

How it works:

		gOC.gameCamera.SetActiveRecursively(true);
		gOC.arCamera.SetActiveRecursively(false);
		
		Renderer[] rendererComponents = gOC.pongGameObjects.GetComponentsInChildren<Renderer> ();

		// Enable rendering:
		foreach (Renderer component in rendererComponents) {
			component.enabled = true;
		}

 

Thank you!

 

Switching between ARCamera and normal Game Camera

March 6, 2013 - 1:32pm #3

Hi, I believe in your case the best would be to stop the QCAR behaviour before switching to the game camera;

you can see this article on how to stop the QCAR behaviour:

https://developer.vuforia.com/resources/dev-guide/special-options-unity

 

Switching between ARCamera and normal Game Camera

March 6, 2013 - 6:53am #2

No hint for me?

Log in or register to post comments