Log in or register to post comments

ARVR switching overrides world center mode

September 27, 2016 - 2:29am #1

Vuforia SDK Version: 6.0.117 -

Description with steps to reproduce: I've been fighting with this one for a week..trying to brute force fix it...but so far I've not been able to and I really need this to work.

ARCamera has a flag for world center mode. In a general sense, among other things, this lets you decide what will be moving around in the scene...the camera or the image target. If you center on the camera for example, when tracking occurs the image target will be flying around in your scene to align itself. If you choose first_target, the image target will not move, but the camera will...to accomplish the same illusion. Depending on what you're making, this can be important or not important.

In many projects, such as this one...it's important. For example if you need to depend on gravity in your scene, particle systems that must run in world-space (as opposed to local-space), having certain objects set as static for perf reasons or for leveraging enlighten, etc. I could make a longer list, but you get the idea.

So what's the actual issue here...

- Setup a project for Mixed Reality switching...ie switch from some AR thing, to a VR thing. For example you're looking at a house on your desk, in AR. And presto...now you're in the house in VR. Yay.
- Use first_target, or any mode in which the ImageTarget isn't the one that is moving.
- Start in AR...all is well.
- Switch to VR....all is well.
- Switch back to AR....everything is fubar. Why? It seems Vuforia is now in Camera mode. The imageTarget is flying around the scene to align itself. So anything you had marked as static...isn't flying with it...because it can't. Any systems that depend on a genuine world space orientation are all acting bizarre for obvious reason.

The reason I'm putting this in the bug section is that, if you inspect the Vuforia object during this time, it still reports that it is in First_Target...just like you set it up. But it's behaving in Camera mode anyway. Also, regardless of what it reported, it shouldn't be returning to AR in a mode that is different from the correct mode.

Some things I have tried...
- At first I figured...big deal...I'll just catch Vuforia after the transition Vuforia to change to First_Target, regardless of the fact it thinks it's already there. This works great in the editor, but not on any device.
- Then I got more aggressive...after the transition, I disable vuforia, restart it, force First_Target. Still doesn't work on the device.
- Finally...the button that switches back to AR...I just attached it to a method that reloads the same scene...which of course works...but is horrible.

The sample exposes this issue, but you can't see it because the sample doesn't do anything except render a few models. So...if the camera is locked or the target is locked doesn't make any difference...to the user it looks the same. But you can use the sample to verify this in the editor easily.
- Load up the sample
- edit the ARCamera to use First_Target
- Start it up. Move stuff around...notice the ImageTarget isn't moving. By default, the sample has it the other way...but we changed it just now to First_Target.
- Go VR.
- Using the scene view, grab the head and rotate it down to see the button (we must do this since we are in the editor and not on a device). After a moment it will trigger the AR switch.
- Now we're in AR again. The ARCamera reports First_Target, but the camera isn't moving anymore...the ImageTarget is.

Perhaps this behavior is simply a default behavior....and the presence of some additional code will inform Vuforia what to fall back to in AR...if this is the case please paste that code here. -

Development OS (Mac OS X, Windows, Linux): all -

Mobile OS and Version: all -

Mobile Device Manufacturer and Model name: all -

Do the Vuforia Sample Applications show the same behavior?: Yep.

ARVR switching overrides world center mode

January 10, 2018 - 10:26am #10

I have a similar issue, but mine pertains to the SetWorldCenter() function. I'm guessing it works the same. Right now I'm using a target limit of 1, so it will never have more than 1 populated in the trackables at any given time. In my use, it's necessary to maintain the coordinate position of every target since they are fixed references in space. I'm using the SPECIFIC_TARGET setting, but I want the user to be able to jump to whatever target has been locked onto.


Essentially my code goes:

IList<TrackableBehaviour> activeTrackables = (IList<TrackableBehaviour>)sm.GetActiveTrackableBehaviours();

foreach (TrackableBehaviour tb in activeTrackables){

if (VuforiaARController.Instance.WorldCenter != tb){

VuforiaARController.Instance.SetWorldCenter (tb);



what I'm noticing is that the camera's relative coordinate sketches out with every jump. I'm about to try to null it out between jumps, like when the lock is lost then reset the world center.


edit: not so good. It gathers the target prior to reassociating the world center so it thinks it's jumping to the right spot but it's not. Is there any way to change the specific target on acquisition? Anyone?


Anyone care to 1-up?

ARVR switching overrides world center mode

November 1, 2017 - 8:23am #9

Thats great if you have one VuforiaBehaviour and one scene with it in. But if you are doing things more dynamically you might not have that set up. Why does Vuforia change the world center mode anyway?



ARVR switching overrides world center mode

April 26, 2017 - 2:18pm #8

When returning to non-rotational AR mode from VR mode (see modes here), try calling the methods like this and use SPECIFIC_TARGET instead of FIRST_TARGET:



When returning to non-rotation AR mode from VR mode which uses DEVICE_TRACKING, the mode will be set back to CAMERA. Immediately set the WCM to SPECIFIC_TARGET and it should work as expected. I tested this on a GS6 device and it appears to work fine. You will need to choose SPECIFIC_TARGET and drag a Trackable to the field in the Inspector first.

See: https://library.vuforia.com/reference/api/unity/classVuforia_1_1VuforiaARController.html


ARVR switching overrides world center mode

April 24, 2017 - 8:20pm #7

Thanks @mrduncan for the in-depth summary. We are looking into this.

ARVR switching overrides world center mode

April 21, 2017 - 12:57am #6

Same here. I also tried to change the World Center mode manually but it doesn't work. I Tried adding this line of code:


and also make some timer between each call without any luck. 

Was any of you guys able to find a turnaround?

I will keep posting here with my tests.


ARVR switching overrides world center mode

April 11, 2017 - 2:38am #5

Bump same issue


starting with AR camera first target world center.

Change to Vuforia.MixedRealityController.Instance.SetMode (Vuforia.MixedRealityController.Mode.ROTATIONAL_HANDHELD_AR);

change back to regular ar mode Vuforia.MixedRealityController.Instance.SetMode (Vuforia.MixedRealityController.Mode.HANDHELD_AR);

world center mode is on camera, but shows first target in the inspector 

ARVR switching overrides world center mode

March 8, 2017 - 5:18am #4

Having the exact same issue!! 

Could someone help us?


ARVR switching overrides world center mode

February 16, 2017 - 12:24pm #3

Bump again.

This a big issue considering there is no way to change world center mode it cannot be changing on its own.

ARVR switching overrides world center mode

October 18, 2016 - 4:45am #2


Log in or register to post comments