Hello Eva,
thank you for your answer. This time, i tried version 6.1, but no improvement.
Your sample is working (3D model - interaction) but there is only rotation via button, not with gestures.
So i only added the following lines of code:
var previousRotationValue = 0;
var previousDragValueY = 0;
var previousDragValueX = 0;
var previousScaleValue = 0.05;
//in this.modelCar = new AR.Model("assets/car.wt3",
...
onRotationChanged: function(angleInDegrees) {
this.rotate.z = previousRotationValue - angleInDegrees;
return true;
},
onRotationEnded: function(angleInDegrees) {
previousRotationValue = this.rotate.z;
return true;
},
onScaleBegan: function(scale) {
return true;
},
onScaleChanged: function(scale) {
var scaleValue = previousScaleValue * scale;
this.scale = {x: scaleValue, y: scaleValue, z: scaleValue};
return true;
},
onScaleEnded: function(scale) {
previousScaleValue = this.scale.x;
return true;
}
You can find the video here:
https://www.dropbox.com/s/4xwxk2u8idvicwq/2017-04-19%2017.25.56.mov?dl=0
Thank You,
Florian
Hello Eva,
I used Gesture with AR.Model instead of AR.ImageDrawable and it worked fine on the iPhone 6s. But i don't see the difference between my sourcecodes, which affects this unintended behaviour.
I did many changes to the 3D Model - interactivity.js so I don't want to start once more from scratch.
Hello Eva,
thank you for your help. I solved the problem. These lines in the index.html did the trick:
<!-- disables pinch-scaling of the webview, so that gestures only do what they're supposed to -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
Florian Auer
Hello,
I'm trying to scale and rotate a 3D object with gestures. I used the example 3D Model Interactivity as startingpoint. On a Android HTC One it's working fine, on a iPhone 6s its really jerky. Sometimes the manipulations aren't processed at all or only after another interaction.
I also tried a simple cube instead of the Lamborghini, but there was no improvement.
SDKs: Javascript Android & iOS 6.0
Thanks!