Aug 19, 2009 at 12:09 AM
Edited Aug 19, 2009 at 12:10 AM
I'm having trouble making stable buildings. Here are some screenshots of the problem in action:
http://pencelgames.com/FarseerQuestion.aspx. I have some bodies and I've tied them together with pinjoints to try to keep things stable, but over time the building skews itself, the pins break
and it all falls down. This process takes about 5 minutes or so. This happens with SAT or Distance Grid, the screenshots were taken using distance grid. I tried making the pins stronger but that just made the building movement more "jumpy"
I've fiddled about with various parameters, and currently am trying these settings, which I've taken from various posts I found regarding good settings for stacking.
PhysicsSimulator.BiasFactor = 0.05f;
PhysicsSimulator.Iterations = 10;
PhysicsSimulator.MaxContactsToDetect = 4;
PhysicsSimulator.MaxContactsToResolve = 2;
PhysicsSimulator.AllowedPenetration = 0.1f;
Then all my bodies are set like this:
mass = 1f;
frictionCoefficient = 1f;
restitutionCoefficient = 0.0f;
I was wondering, should I be structuring my building differently? With diagonal struts or something?