How should I use Box2D to create rooms in real time and update each room step?
Im kinda new in this and the only guide I see are those demos that just create a bunch of objects and let them fall.
What I need is object movement(by user input), collision detection that knows what collided with what. Im having a hard time because Im not that experienced.
I also tried to do this:
var b2d;
Box2D().then(function(Box2D) {
b2d = Box2D;
});
And use b2d, it didnt work(lol). So everything has to be done inside the function? What if I need to create rooms(worlds) real time when players connect?
How should I use Box2D to create rooms in real time and update each room step?
Im kinda new in this and the only guide I see are those demos that just create a bunch of objects and let them fall.
What I need is object movement(by user input), collision detection that knows what collided with what. Im having a hard time because Im not that experienced.
I also tried to do this:
var b2d;
Box2D().then(function(Box2D) { b2d = Box2D; });
And use b2d, it didnt work(lol). So everything has to be done inside the function? What if I need to create rooms(worlds) real time when players connect?