We have the same issue on android devices. The animation loop perfectly on iOS but on Android devices the animation runs 1 time and then stops.
Thx
J
Julien Ferla
said
about 10 years ago
After more testing we found out that it's not on all android devices. The problem only appears on a GS3 running Jelly bean.
C
Christian Ebner
said
about 10 years ago
Thank's to everyone for the valuable feedback. We found a bug when initializing a ModelAnimation which will be fixed with the next update.
The following workaround should work. Instantiate the ModelAnimation every time before you start the animation:
var idleAnimation = new AR.ModelAnimation(this.modelRvWalker, '3_animation'); idleAnimation.start(-1);
Another issue that occurs is when you have more instances of one model and you want to loop all instances infinite times. The workaround for this is to create as many Model objects as you need and animate every single modle instance.
With the next updates you won't need those workarounds anymore and the bug will be fixed. Please let me know if the workarounds work for you. We apologize for inconveniences caused.
Regards, Christian
B
Boston Dell-Vandenberg
said
about 10 years ago
I'm trying to loop a 3D characters ModelAnimation, but despite setting .start(-1) on the animation it only plays through once then stops. Javascript is below, any suggestions what I'm doing wrong?
var World = {
loaded: false,
init: function initFn() {
this.createOverlays();
},
createOverlays: function createOverlaysFn() {
// Initialize Tracker
this.tracker = new AR.Tracker('assets/tracker.wtc', {
onLoaded: this.loadingStep
});
this.modelRvWalker = new AR.Model('assets/rv-walker.wt3', {
onLoaded: this.loadingStep,
scale: {
x: 0.15,
y: 0.15,
z: 0.15
},
translate: {
x: 0.0,
y: 0.05,
z: 0.0
},
rotate: {
roll: 0
}
});
// Idle Animation
this.idleAnimation = new AR.ModelAnimation(this.modelRvWalker, '3_animation');
var rvWalkerOptions = {
drawables: {
cam:
},
onEnterFieldOfVision: this.appear,
onExitFieldOfVision: this.hide
};
var trackableRvWalkerBack = new AR.Trackable2DObject(this.tracker, 'rv-walker-back-test', rvWalkerOptions);
var trackableRvWalkerFront = new AR.Trackable2DObject(this.tracker, 'rv-walker-front-test', rvWalkerOptions);
var trackableQrCode = new AR.Trackable2DObject(this.tracker, 'qrcode', rvWalkerOptions);
var trackableILoveAr = new AR.Trackable2DObject(this.tracker, 'ILoveAR', rvWalkerOptions);
},
loadingStep: function loadingStepFn() {
if (!World.loaded && World.tracker.isLoaded() && World.modelRvWalker.isLoaded()) {
Unfortunately we can't reproduce this behaviour with your code. Could you zip all files of your project including the assets, the tracker and the target image and send it to forum{at}wikitude.com?
Boston Dell-Vandenberg