Log in or register to post comments

[World Center AUTO] Bug with 3 trackables

August 31, 2012 - 7:32am #1

Hi everybody,

I'm still working on my AR project, and today I've found a bug (I guess) when I set the AR Camera World Center to AUTO.
My scene contains 3 trackables, I scan them once, and then I would like to keep only one trackable on the scene, and so I disable the others.
The problem is when the world center is moving from the first trackable to the other one, I lost the scene orientation (10-20% of chance).

I joined a screenshot, that you can see clearly the issue. Green squares should be exactly where trackables are.

Trackable orientation bug

If you want more details, feel free to ask.

Thank you !

 

[World Center AUTO] Bug with 3 trackables

September 6, 2012 - 7:22am #10

As you can see on this function, if you're not in the editor, it won't let you change the world center.

I just commented this lines to be able to change the world center. But, if you look deeper on this script, you can see that mWorldCenterMode is used only once, on Start function.
This is why I used directly "QCARManager.Instance.WorldCenter".

But the result is that everything is rotated, as I expected. There is a good reason if it's not allowed to change the world center by scripting while running the application.

I guess I found a solution, not a smart one, but :D
I let the configuration to AUTO world center, but I changed into the QCARManager script the part where "mTrackableFoundQueue" is filled.
I fill it once, and never clean it. By this way I do what I wanted, detect and track the first trackable on screen, and let the others only be "detected".

After some tests, I can conclude that's enough for me, right now. 

Do you know when a new version of the API is planned? And which kind of features will be added? And do you plan to keep it free? Thanks :) 

[World Center AUTO] Bug with 3 trackables

September 5, 2012 - 6:11pm #9

hmm.. what are you seeing?

Have you confirmed that the world center mode is changing?

You're not supposed to be able to reset this at runtime, but let me check to confirm what the expected behavior is if you do so from the QCARManager.

 

e.g. in QCARBehaviour

    // This method is used to set the world center mode in the Unity editor.
    // Switching modes is not supported at runtime.
    public void SetWorldCenterMode(WorldCenterMode value)
    {
        if (!Application.isEditor)
            return;

        mWorldCenterMode = value;
    }

[World Center AUTO] Bug with 3 trackables

September 4, 2012 - 11:43am #8

I found a way to change the world center by real time but the result is worse :D
I used "QCARManager.Instance.WorldCenter = ..."
I just keep searching a while yet.

 

[World Center AUTO] Bug with 3 trackables

September 4, 2012 - 11:02am #7

I'm using multi trackables detection only to "detect" things and add them into the game, like a QR Code. I'm tracking only the first trackable detected. 

To conclude I'll use the AUTO Mode and hope it won't glitch too much. I guess I can detect the moment when this "non-excepted rotation" appears, and handle it by showing a message to the user. This won't resolve the problem, but could be enough.

[World Center AUTO] Bug with 3 trackables

September 4, 2012 - 10:27am #6

That is a good request for the wish list. Also have you evaluated elecman's Unified Coordinate System solution? It may provide the capabilities that you are looking for.

[World Center AUTO] Bug with 3 trackables

September 4, 2012 - 10:11am #5

I was asking if I can change the World Center when USER MODE is previously setted in the editor, not the World Center Mode itself.
But after few tests, it seems that it's not possible to change it while running the application.

On AUTO Mode, the first trackable is detected, the world center is set by the API. A second trackable is detected, it's position will be relative to the first one. If the first trackable is lost, automatically the second trackable will be the World Center. At this moment, a non-excepted rotation could happend, and as you can see, my green squares could be displayed with a rotation.
Sometimes, the rotation disappears and everything is going back to normal, sometimes...

This is why if I can user the USER World Center Mode, and when the first trackable is detected, to choose it as the World Center, it will be great. 

[World Center AUTO] Bug with 3 trackables

September 4, 2012 - 9:28am #4

No the world center mode can't be reset at runtime. The AUTO mode uses the first target detected as the world center, but only while it's being tracked. If the target(s) are lost and reaquired the world center will be redefined based on the first target detected.

[World Center AUTO] Bug with 3 trackables

September 4, 2012 - 7:41am #3

Nope, I see this bug since the beginning, during scanning my 3 trackables (as you can see on the screenshot, 3 green squares).

So, you're telling me that I can change the world center by scripting if I select on editor USER MODE? If I can do that it will be great.
The first trackable I detect will be the world center, until the end of the game.

And by this way, I can use the USER MODE, and resolve this bug.

How can I change the world center by scripting? I though it was read-only.

[World Center AUTO] Bug with 3 trackables

September 3, 2012 - 2:34pm #2

So you are only seeing this after you have disabled the other trackables? - is this when the orientation shift may occur?

How are you disabling the trackables?

Keep in mind that the Auto WCM will allow the world center to change at runtime..

 

    public enum WorldCenterMode
    {
        // User defines a single Trackable that defines the world center.
        USER,
        // Tracker uses the first Trackable that comes into view as the world
        // center (world center changes during runtime).
        AUTO,
        // Do not define a world center but only move Trackables with respect
        // to a fixed camera.
        NONE
    }

Log in or register to post comments