Question by
augivision · Mar 30, 2018 at 08:13 PM ·
c#vrvuforiaaugmented reality
Can I disable Vuforia's Device Tracker and implement my own?
Hello! I want to use Vuforia's camera background and image recognition, but I also want to disable their device tracker and use my own gyroscope script for my camera.
Vuforia's device tracking sucks. If I can figure out how to implement my own tracker while using their camera background and image recognition, then I can create cleaner VR experiences with AR.
So far, I have only been able to figure out how to disable Vuforia completely and attach my own separate Gyro Camera Controller.
using UnityEngine;
using Vuforia;
public class NoARPlease : MonoBehaviour
{
// Use this for initialization
void Start()
{
Camera mainCamera = Camera.main;
if (mainCamera)
{
if (mainCamera.GetComponent<VuforiaBehaviour>() != null)
{
mainCamera.GetComponent<VuforiaBehaviour>().enabled = false;
}
if (mainCamera.GetComponent<VideoBackgroundBehaviour>() != null)
{
mainCamera.GetComponent<VideoBackgroundBehaviour>().enabled = false;
}
if (mainCamera.GetComponent<DefaultInitializationErrorHandler>() != null)
{
mainCamera.GetComponent<DefaultInitializationErrorHandler>().enabled = false;
}
//mainCamera.clearFlags = CameraClearFlags.Skybox;
}
}
}
This allows me to switch scenes and create a VR scene without Vuforia, but I want to use everything Vuforia has to offer while only replacing their device tracking.
Comment