Start a new topic

3D object rotation

3D object rotation

Please have a look at the translate/rotate/scale attributes of the 3D Models. Those allow you to change orientation in any possible direction.

Kind regards,



Well, I've looked.  That doesn't help at all.  I am feeling really dumb at this point.  I've convinced a customer to buy a licence to this product and now I cannot do something simple like spin a 3D object around.  When I say spin a 3D object around, I mean like the following:

Hold out a cup of coffee in front of you.  Now spin the cup around so you can see all around the outside of the cup.  That is what I want to achieve.

All the SDK/API references/sample code only provide me with the ability to spin the coffee cup so that the contents are emptied into my lap.  Not what either of us want to have happen.


I thought that maybe changing the "" might do the trick.  I tried variances on these (not all at once, one at a time):

this.rotationAnimation = new AR.PropertyAnimation(this.modelCar, "rotate.roll", 0, 360, 10000, {type: AR.CONST.EASING_CURVE_TYPE.LINEAR});
this.rotationAnimation = new AR.PropertyAnimation(this.modelCar, "rotate.heading", 360, 0, 10000, {type: AR.CONST.EASING_CURVE_TYPE.LINEAR});
this.rotationAnimation = new AR.PropertyAnimation(this.modelCar, "rotate.tilt", 0, 360, 10000, {type: AR.CONST.EASING_CURVE_TYPE.LINEAR});


The "rotate.tilt" got the cloest, but it just proceeded to tip the coffee forwards onto my shirt rather than sideways into my lap.

Does that make it clearer to what I need to achieve?  Can it be done?  Can someone provide some guidance without just giving me a link to an API page that does not help at all?

thanks tony


I have a 3D object ( a bag) that I've imported and exported using the Wikitude 3D encoder.  If I load the image using:

scale: {
x: 0.2,
y: 0.2,
z: 0.2
translate: {
x: 0.0,
y: 0.05,
z: 0.0
rotate: {
//heading = rotation around the y-axis
//roll = rotation around the z-axis
//tilt = rotation around the x-axis
tilt: 270, //needs to be set to 270 to be facing the correct way at the start
heading : 0,
roll: 90 //-25


Then my image is scaled quite nicely and the bag is rendered the correct way around.

I now want to rotate the 3D bag.  Not in a flat go left and around in an anticlockwise circle, but have the bottom of the 3D bag stay fixed to the spot and rotate the 3D model so I can see all the way around the bag.

I've fiddled with the settings / values for the following:

this.rotationAnimation = new AR.PropertyAnimation(


But I cannot get it to do what I need.  Can anyone point me int he right direction?

thanks tony

Hi Tony,

This sounds like in our 'Interactivity sample' where the 3D model can be rotatated around 360?.




The Interactivity sample is exactly what I don't want.  That just spins it around in a flat 2D circle.  I have the SDK Example installed and am using it as a guideline.

The closest I can get is the 3.4 Snap To Screen example.  That allows you to spin the car around, but only after you have pressed the 'snap to screen' button - anyway to get it to spin without having to 'snap to screen'?

I copied the 3.4 Snap to Screen files and just swapped them with my .wtc and .wt3 files and the code works fine, but as I say the 'rotate' button spins the image "flat" anti-clockwise and I need it to spin the 3D image around.

I also need the image to be bigger than the model car is shown, but I'm assuming that's just changing the scale values?


Login or Signup to post a comment