How to achieve the Tap, Pinch/Zoom In /Out effect?

How to achieve the Tap, Pinch/Zoom In /Out effect?
0.0 0


i try to find the best way to do this effect when you Zoom in/out with 2 fingers
is there any way in cocos2d-x 3.3 to do this ? or i need to port it from some iOS solution ?
(i didn’t found any …)


Cocos2d-x doesn’t implement the this function, and you should implement it by yourself.

Note that:
1.Judge it is a multiple touch or a single touch.
2.Change the anchor point real-time.
3.Set scale range.

at last, don’t forget to enable iOS multiple touch support.

[eaglView  setMultipleTouchEnabled:YES];

You can refer to this video:


There has been discussion regarding XTLayer.

We used a modified version of:


Thanks i will take a look and implement something …
it should be part of cocos engine i guess …


Notice that the core team is thinking about it.

Another with code:
Generic gesture recognizer for cocos2d-x

Another with code:
Extension: Gesture Recognizers for cocos2d-x

(posted these for my reference as well)


Thanks @stevetranby i think i have some reference to work with now