Search code examples
unity-game-engineaugmented-realityvuforia

How to use marker tracking and ground plane in one Vuforia app?


I've been trying for quite some time now to use both marker tracking and ground plane tracking together in one Unity app, but I cannot get it to work properly. Vuforia seems to be limited to either "ground plane mode" or "conventional marker tracking mode". Marker tracking only works fine as long as the plane finder game object in Unity or the Vuforia device tracker is inactive. If however I activate the plane finder, the marker tracking is broken and the content that is supposed to be rendered on the marker floats around instead.

I know I can programmatically switch the plane finder on or off at any time, but doing so will cause the screen to go black for a couple of seconds. To be clear, I am not trying to use marker tracking and plane tracking at the same time, just in the same application and Unity scene. The user should be able to do both track a card-sized marker and spawn a ground plane later on. In my opinion though it breaks the immersion if the app and camera freeze while Vuforia switches to "ground plane mode".

Surely there must be a way to get a seamless transition between marker tracking and ground plane in Vuforia?


Solution

  • "Marker tracking only works fine as long as the plane finder game object in Unity or the Vuforia device tracker is inactive"

    I believe this is not correct. You can use both at the same time. Also, since you use ground plane positional device tracking is automatically activated. Then you can switch between fusion modes Optimize for Image Targets and Vumarks and Optimize for Model Targets and Ground Plane based on your scenario you explained in your question.

    The problem about this is your image targets will still be tracked even though they are not visible in the frame due to positional device tracking but you can also come up with a work around for that by scripting.