box2d 碰撞创建joint的时机

 

You are not allowed to modify the world inside a callback. The assert statement is stating that it has locked the world to begin the simulation step so you are not allowed to perform that operation.

This problem is solved by caching the contact events and processing them after the simulation step.

如果不在step中进行判断,或者回调,会出现 b2Assert(IsLocked() == false)的错误

你可能感兴趣的:(box2d 碰撞创建joint的时机)