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 6965173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:01:20+00:00 2026-05-27T16:01:20+00:00

I am writing an iphone game using cocos2d and box2d engines. I have a

  • 0

I am writing an iphone game using cocos2d and box2d engines.
I have a ball which can be jumped by tapping the screen. The jump is applied by using ApplyImpulse method on the ball’s body.

Thing is I do not want the ball to jump more than once. (i.e. If the ball is in mid-air I do not want it to be jumped again when tapping the screen.)

Is there a way to know when an object is in mid-air ?
Is there a common solution to this problem ?

Thanks

  • 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-27T16:01:21+00:00Added an answer on May 27, 2026 at 4:01 pm

    You can raycast from the center of the ball, downwards. If it collides with anything at a distance greater than the ball’s radius, that means it is in the air.

    To raycast, check chapter 10 in the manual here:
    http://box2d.org/manual.pdf

    It’s in c++ but you should find similar examples in objective-c.

    Hope it helps.

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

Sidebar

Related Questions

I am writing a game for the iPhone/iPodTouch (using Cocos2d) and I have noticed
I have an iPhone game in which players can tweet their score. I use
I'm writing a game using cocos2d-iphone and our stages are defined in .plist files.
I'm writing an iPhone game in objective-C using XCode. I'd like to profile the
I'm writing a game for iPhone, and I want an online leaderboard using mySQL,
I'm writing iPhone/iPad application. I have UITextView in which I automatically appending text. How
Am a flash game developer at present I started writing games for iphone using
I am writing an iPhone game and have it working well with my level
I'm currently developing a game on iPhone using the Cocos2D API. It's going well.
I'm writing a game for iPhone/iPod. My engine is using OpenGL-ES, and this means

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.