I'm trying to draw an object when a image is recognized. I use the following code:
var imgOneScale = 0.04;
var imgOnePositionX = -0.52;
var imgOnePositionY = 0.24
this.imgOne = new AR.Model("https://www.docummedia.com/WikitudePlugin/01_ImageTracking_3_Interactivity/assets/ruption.wt3", {
scale: {
x: imgOneScale,
y: imgOneScale,
z: imgOneScale
},
translate: {
x: imgOnePositionX,
y: imgOnePositionY
},
rotate: {
y: 180
},
enabled: false
});
World.drawables.push(this.imgOne);
this.pageOne = new AR.ImageTrackable(this.tracker, "CircleRuption_Black_MagentaFont_Large", {
drawables: {
cam: World.drawables
},
onImageRecognized: World.hideInfoBar,
onError: World.onError
});
It is giving me the error: " Cannot read property 'push' of undefined"
Can someone help?
It was missing the initialization of drawables: