   Box2d Lite, One corner sinking
  I've been messing with the box2d lite code and was trying to do something similar in my little C#.net program. I kept having a behaviour where one corner of my box would sink into my ground box, then suddenly pop back out, sometimes launching the box into the air. So I completely copied the Box2d Lite code line by line, and even though now there is basically no difference between the two, I still get the same behaviour of the sinking corners.I believe it is something to do with the position correction, because the other options have no effect, turning OFF position correction causes the box to usually rest on a corner, but no sinking. I'm unsure as to why the behaviour is so different, you can take a look at the source hereSource Codebelow is a couple of screen grab of it occuring before the box get kicked into the air.
  I'm giving up on this, I cannot seem to get it to port over to C# correctly. It appears for whatever reason, that when resting flat on the ground, only one contact is being generated. so the second corner just passes through. I've check and rechecked, and can't spot the problem. So I'm just going to move to C++, I was easily able to port my nonworking code over to that, and it worked, so I'm at a loss as to what the issue is.   ;  There is another Box2D spin-off project called "Box2DX" which has already been ported to C#.  I've only tried out their demo project though.  Their demos didn't appear to have the corner-sinking issue like what you describe.   ;  Check your clipping code:1) Which face is the reference face and which is the incident face2) Is the clip polygon from the incident face correct3) Are the clip planes from the reference plane correct (where point the normals)4) Does the clipping work correctlyAll these phases can easily be validated using some debug drawing. If you only get one contact something is wrong in you contact generation.HTH,-Dirk;  I'll take a look at it again tonight, the code is basically a line for line copy of the box2d lite code, including comments. I only really changed what I had to for C#, so it shouldn't be any different from the lite code.   