Log in or register to post comments

How do you load a scene with a Mid air tracker enabled?

September 25, 2018 - 2:10am #1

I'm trying to get Mid air tracking working in Unity with not much luck so far.

So the situation is this:

I can create a scene using a mid air tracker and place an object if I start the app using that scene.

If however I want to do something else first like show a menu and then load the AR scene later it fails.

But I can take the core samples Unity project and mess around with it to change the ground plane example to start with the drone and get that working when loaded from the menu. So I know it's possible.

So what "special thing" does that example do that the standard tools do not?

I create my scene by using the Vuforia menu options, Vuforia -> Mid Air -> Mid Air Positioner / Mid Air Stage

I also found a thread saying you have to disable the Mid Air Positioner Behaviour until OnVuforiaStarted is called, but that doesn't seem to solve it for me.

I can create a scene with a ground plane scene using the standard tools and load that via a menu and that works ok, it's just mid air that doesn't.

What other things do you need to do to load a mid air scene and get the tracker started and working?

 

How do you load a scene with a Mid air tracker enabled?

September 25, 2018 - 2:22am #2

Ok, I've actually just noticed an error. When I load the scene and Vuforia starts with a Mid Air tracker it adds a DefaultMidAirIndicator with an Anchor behaviour on it to my MainCamera and not the AR camera.

...and if I untag my Main Camera before loading the AR scene I get a Vuforia initialisation error :(

Vuforia initialization failed

DefaultInitializationErrorHandler:SetErrorCode(InitError) (at Assets/Vuforia/Scripts/DefaultInitializationErrorHandler.cs:166)

DefaultInitializationErrorHandler:OnVuforiaInitializationError(InitError) (at Assets/Vuforia/Scripts/DefaultInitializationErrorHandler.cs:26)

System.Delegate:DynamicInvoke(Object[])

Vuforia.DelegateHelper:InvokeDelegate(Delegate, Object[])

Vuforia.DelegateHelper:InvokeWithExceptionHandling(Action`1, InitError)

Vuforia.VuforiaRuntime:HasInitializationCompleted()

Vuforia.VuforiaARController:UpdateState(Boolean, Boolean)

Vuforia.DigitalEyewearARController:Update()

System.Delegate:DynamicInvoke(Object[])

Vuforia.DelegateHelper:InvokeDelegate(Delegate, Object[])

Vuforia.DelegateHelper:InvokeWithExceptionHandling(Action)

Vuforia.VuforiaBehaviour:Update()

Log in or register to post comments