Start a new topic

onEnterFieldOfVision is not fired after AR.context.destoryAll()

onEnterFieldOfVision is not fired after AR.context.destoryAll()
1 Comment

I made Tracker and Trackable2DObject like this, and it works without any problems.



makeTracker: function makeTrackerFn() {

    this.tracker = new AR.ClientTracker("assets/", {

        onLoaded: function(){

  "marker loaded");




    this.marker = new AR.Trackable2DObject(this.tracker, "a", {

        onEnterFieldOfVision: function(){

  "Marker Catch ");






However after AR.context.destroyAll(); onEnterFieldOfVision is not fired anymore.


My test procedure is like this below.


/*check point 1*/"1:World.tracker.enabled:" +World.tracker.enabled);// >> true"1:World.tracker.src:" +World.tracker.src);// >>  assets/"1:World.marker.enabled:" +World.marker0.enabled);// >>  true"1:World.marker.destroyed:" +World.marker0.destroyed);// >>  false


AR.context.destroyAll();// Destory


/*check point 2*/"2:World.tracker.enabled:" +World.tracker.enabled);// >> undefined"2:World.tracker.src:" +World.tracker.src); // >> undefined"2:World.marker.enabled:" +World.marker0.enabled); // >> undefined"2:World.marker.destroyed:" +World.marker0.destroyed); // >> true


World.makeTracker();// remake the Tracker and Trackable2Dobject.


/*check point 3*/"3:World.tracker.enabled:" +World.tracker.enabled);// >>true"3:World.tracker.src:" +World.tracker.src); // >>assets/"3:World.tracker.destroyed:" +World.tracker.destroyed); // false"3:World.marker.enabled:" +World.marker0.enabled); /// >> true"3:World.marker.destroyed:" +World.marker0.destroyed); // >> false



I have confirmed tracker aned trackable2Dproject is destoroyed after AR.context.destroyAll(), ( Check Point 2)


then confirmed that Tracker and Trackable2Dobject is correctly re-created ( Check Point 3)


However onEnterFieldOfVision is not fired anymore.

I really appreciate if you have any clues.





Login or Signup to post a comment