TOUCH & MOVE (Multiple)

2
Nov
2012

UPDATE: This demo may have some issues. Please check this demo which is 100% working.


Just like the previous demo, this demo is about moving the body by touching and dragging it, only this time you can drag multiple bodies at once using multiple fingers (only if your device supports multi touch). You can also drag a single body if you want.

For this I have used HAMMER.JS javascript library. Just touch the bodies with your fingers and try to move the body.

If there happens to be any problem with this demo or any sort of weird behavior, please comment or give me a feedback (Reply section).

Meanwhile here's the demo.

By administrator at 12:39:27 AM 4 Comment(s)

Comments

This is great! It works pretty well on iPhone 4S. One problem I noticed is when you have both objects 'touched', you can't fling them. As soon as your finger lifts off the screen, the object stops where your finger exited. Hope this makes sense. You can fling individual objects though. On Android (Droid Incredible), multi touch doesn't work correctly. It thinks you're attempting a pinch, and tries to zoom in and out.
By Seth Davis on 3 Nov, 2012 at 12:51:37 AM
What's the version of Android do you use?

The Hammer.js documentation says that it's transform feature is supported only on Kindle Fire, iOS, Android 4 and Android 5.

This is the feature that prevents "pinch & zoom (in & out)". So unless you have a device other than the said ones, it will not work on your device.
By administrator on 3 Nov, 2012 at 02:18:15 PM
About the "fling" issue, can you please check it and tell me now?
By administrator on 3 Nov, 2012 at 02:48:00 PM
The fling seems to work better now! It will still stop every once in a while. It's almost like the joint stays there instead of getting removed. Yeah, my android is 2.x, so that's why it's not working. Makes sense! Great work with this. Looking forward to trying it on a win8 tablet
By Seth Davis on 4 Nov, 2012 at 05:58:40 AM

Add a Comment

Please enter the email address.Invalid format. (Won't be Displayed)
Notify me of followup comments
Enter the displayed Code: captcha