Start a new topic

Instant tracking without having to initialize?

Is there a way to start instant tracking without having to click a button to set the ground plane? For example, in the sample `05_InstantTracking_1_SimpleInstantTracking` can it just start tracking once the crosshairs turn green indicating that tracking is possible?

1 Comment

Hi Joe,


yes, you can start tracking without any user interaction. Just wait for InstantTracker.canStartTracking to return True and then set InstantTracker.state to AR.InstantTrackerState.TRACKING. The tracking origin will then be, of course, at some random position; wherever the the device happened to be pointing at the time.


Something like this should do the trick.


setInterval(
    function() {
        if (World.tracker.canStartTracking && World.tracker.state === AR.InstantTrackerState.INITIALIZING) {
            World.tracker.state = AR.InstantTrackerState.TRACKING;
        }
    },
    1000
);


- Daniel

Login or Signup to post a comment