Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using ccTouchesBegan/ccTouchesEnded to move sprite from one point to another but I'm having problem, if i give two or more consecutive inputs one by one while sprite is moving(runAction is being performed). It first moves to last point i touched and then teleports itself to previous touched points one by one.

share|improve this question

It does it because you are running two actions at the same time. Before making the sprite take an action just make it stop current/all actions he's doing.

share|improve this answer
What's the difference between CCTouchBegan and CCTouchesBegan? – 2600th Mar 21 '12 at 11:47
I don't rwally know but I would say Touches tracks multitap? Look at the function methods and you will know. – MLProgrammer-CiM Mar 21 '12 at 12:01
@Beast one only invokes when working with multi-touch, and one will invoke with both single touch an multi-touch. – Ali.S Mar 21 '12 at 13:39
Can't get CCTouchBegan to work. – 2600th Mar 22 '12 at 5:38
up vote 1 down vote accepted

To detect mulitouch use ccTouchesBegan as described in tutorial at cocos2d-x site. To detect single-touch you can use ccTouchBegan as described here.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.