I am trying to start using box2d in a game I writing (just started from scratch) and I am having some trouble getting things to work. I have some very simple code in place, and when I even try to create a new b2world at the beginning of my layer’s init routine the entire routine seems to error out (will try to debug this but I am assuming its a simple setup or name/scope issue?).
What I have done so far is enable box2d in my cocos2d.js source file (i.e. box2d:true) and then in my init routine I have the following line of code:
// Creat the box2d world
this.world = new box2d.b2World(
new box2d.b2Vec2(0, 0), //gravity
true //allow sleep