Log in or register to post comments

simulate first marker detection

December 23, 2011 - 12:18am #1

How do I create an event which simulates a marker being detected for the first time in the Unity3d Editor? If I just disable the game object which contains the QCAR scripts, it creates all sorts of problems at startup.

Once the marker is detected, I also need to create an event which simulates that the tracking is lost.

Note that my app doesn't just simply draw a parented 3d object. It is far more complex then that and handling markers being detected and lost are important events I need to track. Because I am unable to simulate these events, I am forced to use String for debugging because it has an in-editor webcam preview which does the trick.

Re: simulate first marker detection

December 23, 2011 - 8:22pm #3

Ok, thanks.
I have added it to the feature requests as well.

Re: simulate first marker detection

December 23, 2011 - 6:48pm #2

QCAR doesn't currently provide a means to simulate these events in the Unity editor. You can search for the UpdateTrackablesEditor method (in TrackerBehaviour for 1.0.6 or QCARManager for 1.5) and see that this is setting each Trackable's status to Tracked each frame. You can comment out the call to UpdateTrackablesEditor and then use your own scripts to set the status of each trackable each frame, e.g.

trackable.OnTrackerUpdate(TrackableBehaviour.Status.TRACKED);

- Kim

Log in or register to post comments