Help me! ! Want to move the object when I pinch (IOS)

I want to move the object when I pinch zoom into any position with The Model Viewer Starter Kit.

It does not go well even doing anything.
somebody help! ! ! !

I set T key to move, and automatically stop where I specified location but it doesn’t work.
Maybe I couldn’t use "if "sentence certently.

This is the link to my project
http://playcanv.as/b/xVLpeoL5/

https://playcanvas.com/project/404534/overview/tesu

Hi Sinobu,

Had a quick look into your project while procrastinating from my own. I didn’t see anything but black, the project isn’t loaded which, according to the JS-console, is due to the if clause on line 65 in “r.js”.

With that if, you try to say: “If there is a pinch-zoom, do this and that”, right?

While not knowing about the mobile touch commands of PC yet, I would recommend to attach the pinch in the initialize part of the script (app.something.on(“On what?”, callback function)).

Good luck!
Greg

HI Greg

Thank you very much for your reply!

I’m really sorry and I showed the terrible code.

I asked acquaintance to help for those problem and he helped me so the project has been moving forward.

It is able to move the object in a pinch now.

But one thing I do not know the value of just “this.targetDistance”(r.js)
It looks like there is no debugging tool which I can use so really in trouble again.

Is there something better way?

anyone can help me please.

thank you

https://playcanvas.com/project/404534/code

Hi @sinobu. It is easy to debug scripts in PlayCanvas. I recommend using Google Chrome but you can do this in any browser. First, launch your app, then hit F12 (on Windows) to open the browser Dev Tools. Then activate the ‘Sources’ tab. You’ll see something like this, where you can find your source file, set breakpoints and inspect variables: