0

I want to perform animation when my touch detect. I have 60 images which is use for perform animation. 30 images is used for right side movement like 3d effect and 30 images is used for left side movement.

My device orientation is Landscape. Query is when my touch move right to left then left side animation performed and when my touch moves to left to right then right side animation performed.

How can i do this type of stuff??

If any one have idea of suggestion then put sample code or any link.

Thanks in advance.

Leena
  • 109
  • 1
  • 10
  • You are using cocos2d for all the game or is a mix of UIKit + cocos2d? – Sebastián Castro Oct 11 '12 at 13:16
  • You can use swipe/pan gesture recognisers to check where yor touch is moving ..! – Shailesh Oct 11 '12 at 17:37
  • @Setrio,Still i am only using cocos2d for animation. So if you have any idea regarding my condition then please tell me. – Leena Oct 12 '12 at 03:39
  • @Shailesh,How can i use swipe/pan gesture recognizers?? I am still only using cocos2d. So if you have any idea then tell me in detail. Its very thankful to you. – Leena Oct 12 '12 at 03:42
  • You can mix Cocos2d with UIKit and can use gesture's in you project. See this link: http://stackoverflow.com/questions/7420078/detect-when-uigesturerecognizer-is-up-down-left-and-right-cocos2d – Shailesh Oct 12 '12 at 05:19
  • @Shailesh,Thanks for reply i did it but one problem is occur. When swipe left method call in swiping left side. At that time i want cal swipe right method. Problem is when i hold mouse in swipe left that time swipe right can not call. I want to call both method while change direction of mouse. – Leena Oct 12 '12 at 05:56
  • Now Iam bit confused, Do you want to call two methods for single swipe .? Can you at least tell me what behaviour you are trying to implement? – Shailesh Oct 12 '12 at 06:31
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/17912/discussion-between-leena-and-shailesh) – Leena Oct 12 '12 at 06:46
  • I want perform both right and left swipe While holding click changing direction to left-right. – Leena Oct 12 '12 at 06:51

0 Answers0