Switching of components box2d (cos2d)



  • Is it possible to retread elements (box bodies) on screen Box2D? Box under iOS - cocos2d



  • Having remembered a little of the documentation, it was clear that the bodies could be moved to Box2D. This requires the use of one of the types of compounds (Joints), in your case Mouse Joint should be used. http://www.box2d.org/manual.pdf It's chapter eight that you're going to be fully aware of, and about Mouse Joint you'll find in chapter 8.10 if you need a source code or something to explain in greater detail. http://www.raywenderlich.com/475/how-to-create-a-simple-breakout-game-with-box2d-and-cocos2d-tutorial-part-12 There's a lesson with explanations on a simple game.

    Well, there might be another option. bodyDef.type = b2_dynamicBody; (or in your case) static_bodyRenamed bodyDef.type = b2_kinematicBody;




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2