Start a new topic

How to change between two 3D image

How to change between two 3D image

Hi, currently im using wikitiube sample WikitudeSDK_Android_3_2_1.

 I'm using the sample 2.3 (3d and image recognition interactivity), and i like to change the 3d car image after i click on the rotating button but i was unable to do it. i have tried several way, but i only manage to change my own 3d image rotating but not switching. So i like to check with you wherther there is a way or code to type in order to change between two 3d image after i click the rotating button.

I'm guessing you are refering to a 3d model when you write 3d image. To exchange them do the following:

var newModel = new AR.Model(...); = ;

This will replace any existing drawables with the newModel.

For debugging any js related errors, I suggest using the ADE (see SDK documentation for more details) and do the debugging inside a desktop browser. 

thanks, but still unable to change the 3d image.

This is the new code i had added.


this.modelFace = new AR.Model("assets/face.wt3", {

onLoaded: this.loadingStep,

onClick: this.toggleAnimateModel,

scale: {

x: 0.0,

y: 0.0,

z: 0.0


translate: {

x: 0.0,

y: 0.05,

z: 0.0


rotate: {

roll: -25





toggleAnimateModel: function toggleAnimateModelFn() {

// if (!World.rotationAnimation.isRunning()) {

// if (!World.rotating) {

// World.rotationAnimation.start(-1);

// World.rotating = true;

// } else {

// World.rotationAnimation.resume();

// }

// } else {

// World.rotationAnimation.pause();

// } = ;



return false;





on a quick check it looks like there might be problems regarding Javascript. Please test using the ade.js inside a desktop broweser or by using on device debugging. Our documentation includes more information on this.
Login or Signup to post a comment