fljot / Gestouch

Gestouch: multitouch gesture recognition library for Flash (ActionScript) development.
MIT License
355 stars 85 forks source link

Starling.simulateMultitouch and Gestouch #48

Open lacene opened 11 years ago

lacene commented 11 years ago

First of all, thank you very much for this framework. I love it!

I am sorry if you have addressed this before, but I have not been able to find the solution or explanation. I am using Gestouch on a Starling project. I am trying to use the simulateMultitouch option to be able to test the app on the AIR simulator, but it does not seem to be working. Is this a known issue or am I doing something wrong? Any help is greatly appreciated.

Thanks again!

-ACC

fljot commented 11 years ago

The whole Starling input system (their touch events and multitouch property and simulator) are not related to Gestouch, so you can't normally(!) test it that way.

/* A bit of explanation how and why: Gestouch has no dependencies to any rendering engine, default input adapter listens to native flash MouseEvent or TouchEvent on the flash.display.Stage. Starling does the same for itself. So all those Starling multitouch thing has nothing to do with Gestouch. /

BUT Gestouch architecture allows you to control the input, so that you could use something not common e.g. TUIO (information about touches comes via socket). So what you can do is use custom Starling input adapter (that uses Starling touches as input), this way you can benefit from Starling.simulateMultitouch. Felipe Peternella @felipevex has posted his version of such input adapter here https://github.com/fljot/Gestouch/issues/42. But I would not recommend to use it in production release, only for development.

p.s.: Haven't tried that myself, so please report results =)