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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:18:05+00:00 2026-05-30T07:18:05+00:00

I am creating the physical body in box2d as below , this si my

  • 0

I am creating the physical body in box2d as below , this si my code

 b2BodyDef carBodyDef;
carBodyDef.position.Set(x/PTM_RATIO,y/PTM_RATIO);
carBodyDef.type=b2_dynamicBody;    b2Body* carBody=physicsWorld->CreateBody(&carBodyDef);

b2CircleShape carShape;
carShape.m_radius=rad/40.0f;


b2FixtureDef carFixture;
carFixture.shape=&carShape;
carFixture.density = 1.0f;
carFixture.friction = 0.0f;

carBody->CreateFixture(&carFixture);

return carBody ;

When am running the app, its getting crash ,
with the below erro
*Assertion failed: (IsLocked() == false), function CreateBody,*in box2d

  • 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-30T07:18:06+00:00Added an answer on May 30, 2026 at 7:18 am

    That’s because you are creating your body during execution of Step() function of b2World. You can’t create new bodies while this function is executing

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

Sidebar

Related Questions

Creating Traversals for Binary Search Tree with Recursion. void inOrder(void (*inOrderPtr)(T&)) { if(this->left !=
(creating a separate question after comments on this: Javascript redeclared global variable overrides old
Google is creating broken links, the report says this: Jul 19, 2011 http://www.therapistjobsonline.com/openings/2011/06/21/speech-language-pathologist-jobs-in-paris/texas-speech-therapy-jobs/physical-occupational-speech/blog/index.php 404
I have a 2D array that holds unique integers - this represents a physical
I have the following code, which was creating a graph on the confirmation page
I want to create a Java File object in memory (without creating a physical
Creating a view with following code. - (void)loadView { paintView=[[UIView alloc]initWithFrame:CGRectMake(0, 50, 320, 430)];
Creating a patch is very easy in SubVersion, With Tortoise, you right-click and select
Creating hashes of hashes in Ruby allows for convenient two (or more) dimensional lookups.
Creating an XPathDocument with referenced DTD sometimes throws a web exception. Why?

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.