Search code examples
androidhaxeopenflhaxeflixel

HaxeFlixel - multitouch zoom


This question is rather short: is there any way of implement multitouch camera zooming for android? Before answers like: show me your code etc etc. I don't have any code. I didnt find any solution.

So question is: does HaxeFlixel support multitouch for android / iOS devices?


Solution

  • Yes, HaxeFlixel does support multi-touch, see FlxTouchManager or check the cheat sheet.

    You get a list of touch points (with x and y coords in screen space and world space). You have to implement your own handling of gestures - it doesn't come with built-in pinch handling (or other gestures). But I found a nice library for gestures that you might be able to use:

    https://github.com/rockswang/roxlib