I'm trying to build the skeleton of a building using only rectangles of the same size(the floors are horizontal and walls vertical rectangles, I have 3-4 levels). The problem is that the structure seems to be very elastic and oscillates after is bing created, then collapsed. I'm using the following parameters for the boxes: friction, density and restitution.
Do you have any idea how I can fix it? I want to have a solid structure and the density > 0. I've tried different densities, friction and restitutions, but the problem persists. Is there any other parameter or any trick?
Code:
var boxDef:b2PolygonDef = new b2PolygonDef();
boxDef.SetAsBox(w, h);
boxDef.friction = 1;
boxDef.density = 1;
boxDef.restitution = 0;
boxDef.SetAsBox(w, h);
boxDef.friction = 1;
boxDef.density = 1;
boxDef.restitution = 0;
Do you have any idea how I can fix it? I want to have a solid structure and the density > 0. I've tried different densities, friction and restitutions, but the problem persists. Is there any other parameter or any trick?