Log in or register to post comments

Enable / Disable camera/trackables in Vuforia 5

September 4, 2015 - 12:29am #1

Hello guys,

I'm working on an app that uses both ar and normal camera in unity depending on what the user wants. The user can switch from one mode to the other at any time in a single scene. I'm trying to enable / disable the ar camera in a proper way. I have try the code as shown in the link below  but the code is for an older version.

Enabling / Disabling tracking within single unity scene iOS

I have replaced ImageTracker with ObjectTracker but i can't find what i must replace Tracker.Type.IMAGE_TRACKER with. Right now I'm just getting a reference to the ar camera and imagetarget and just use setActive(false / true).

Any ideas or suggestions would be much apreciated.

Enable / Disable camera/trackables in Vuforia 5

September 4, 2015 - 9:51am #2

The easiest way of disabling Vuforia Camera and Tracker functionalities, is to simple disable the VuforiaBehaviour component;

in Vuforia 5 this is as easy as calling this line:

    VuforiaBehaviour.Instance.enabled = false;

and you can then restart it with:

    VuforiaBehaviour.Instance.enabled = true;

 

If you instead only want to disable the video background rendering, you can disable the MeshRenderer of the Background Plane as per instructions here:

https://developer.vuforia.com/forum/faq/unity-how-can-i-disable-video-background

 

Log in or register to post comments