Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7618501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:25:12+00:00 2026-05-31T03:25:12+00:00

I am using cocos2d. I would like to be able to detect whether the

  • 0

I am using cocos2d. I would like to be able to detect whether the screen is touched at a particular instant – that is, rather than intercepting an event when it occurs, I want to detect the presence of touch at a particular moment.

The reason is that I am animating sprites and want to determine if the sprite should keep moving – if the screen is still touched. I cannot use ccTouchesEnded because each time an animation starts I set isTouchEnabled to false because I also want the user to be able to tap rapidly on the screen to move the sprite but if they tapped too rapidly, it would mess with the position of the sprite during the animation process – which I have found screws up the positions of my objects in weird ways.

Is this possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T03:25:13+00:00Added an answer on May 31, 2026 at 3:25 am

    There does not appear to be any public API to detect touches other than enabling and receiving these events in the main UI run loop.

    You can keep handling events, and set the state left by the last touch event in a model object or global variables. Then you can poll your app’s own internal state at any time.

    Instead of disabling touches, you can just have your touch handler not do inappropriate things if the event time stamp is too close to some animation start time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In Cocos2D, I would like a sprite placed on a screen coordinate, not a
I would like to know how to draw text/label at specific angle using cocos2d.
I would like to make an iPhone app supporting Portrait & PortraitUpsideDown using cocos2d-iPhone
How would one go about creating a custom action in Cocos2D that was able
I'm using the CCNode class in cocos2d and would like to use its schedule:interval:
I'm using the SimpleAudioEngine for cocos2d and when one track finished I would like
I'm working on a platformer for the iPhone that is using Box2D and cocos2D.
I am creating application in cocos2d, but one thing I would like to know
I am using Box2D with Cocos2D in my game. I am aware that Cocos2D
In a game that I am making whilst using Cocos2d, I have a sprite

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.