Basic Use of ApplyImpulse
- by nycynik
I am trying to apply a force to a bunch of b2_dynamicBodys, but it seems to only work for a random number of items and then stops with an error.
//create some items to move
bodyDef.type = b2Body.b2_dynamicBody;
for(var i = 0; i < 5; ++i) {
fixDef.shape = new b2PolygonShape;
fixDef.shape.SetAsBox(1,1);
…