Start a new topic

i change the file wtc

i change the file wtc


Hi everybody!

 

I just wanted to change the file "Wikitude" should recognize. I loaded a picture on "http://www.wikitude.com/developer/tools/target-collections" and download the "volcan.wtc" picture. 

 

I put in the "assets" folder and change the name in the "imagerecognition.jsl" file. 

But it does not detect anything.

 


createOverlays: function createOverlaysFn() {

   // Initialize Tracker

   this.tracker = new AR.Tracker("assets/volcan.wtc", {

      onLoaded: this.worldLoaded

   });

 

   // Create overlay for page one

   var imgOne = new AR.ImageResource("assets/imageOne.png");

   var overlayOne = new AR.ImageDrawable(imgOne, 1, {

      offsetX: -0.15,

      offsetY: 0

   });

   var pageOne = new AR.Trackable2DObject(this.tracker, "pageOne", {

   drawables: {

      cam: overlayOne

   }

   });

},

You need to change the target name in the definition of the Trackable2DObject to the name of your target image. In your case you need to change the ID "pageOne" in the code below to the target name of your target. Here is how to get the target name

var pageOne = new AR.Trackable2DObject(this.tracker, "pageOne", {

   drawables: {

      cam: overlayOne

   }

   });

It's ok. Thanks! :)
Login or Signup to post a comment