How to make swipe gesture in cocos2d iphone?

How can I make wipes in cocos2diphone / ipad in all directions? When the swipe touches (passes to) on the sprite, I want to execute a function at this time, for example, I want to cut this object when scrolling this sprite.

+3
source share
2 answers

You should look for cocos2d and a gesture recognizer. Check this message

cocos2d-iOS - gesture recognizers

and google will help too ...

+3
source

UISwipeGestureRecognizer may give you a problem, because it supplies you only with the coordinates of the place where the swipe starts (it calls only one handler at a time).

: http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UISwipeGestureRecognizer_Class/Reference/Reference.html

UIPanGestureRecognizer. , (.. , ). , /.

+1

All Articles