I have multiple AnimatedImageDrawable object.So I push them in the Array.In loop I just pass array in "Cam".The problem is Some time AR show in screen and sometime it does not display on the screen.When I restart the app more than a time It will start recognized the target and AR display on the Screen.
Following are the code snippet.
var myArr=;
AnimatedDrawable1 = new AR.AnimatedImageDrawable(image, 1.0,400,240,{
offsetX: 0.1,
offsetY: -0.4,
});
AnimatedDrawable2 = new AR.AnimatedImageDrawable(image1, 1.0,400,240,{
offsetX: 0.1,
offsetY: -0.4,
});
myArr.push(AnimatedDrawable1)
myArr.push(AnimatedDrawable2)
for(var i=0;i<myArr.length;i++)
{
pageOne = new AR.Trackable2DObject(this.tracker, "*", {
drawables: {
cam:
},
distanceToTarget: {
changedThreshold: 1
},
onEnterFieldOfVision:function(){
}
});
}
Please Help me out .
Thanks &Regards,
Tarun Kumar
S
Simon 248601
said
almost 8 years ago
Hi Tarun,
could it be that your target isn't tracking very good? Did you try it with another target?
Best regards, Simon
T
Tarun K
said
almost 8 years ago
Hey,
I have solved the problem.Actually the Image size is in MB and Image Pixel dimension is 2400 x 1200 So it does not load at the first time.I have decreased the size and dimension.Now it's working..!!!!
Visualfan2012