laftworld3141 / box2d

Automatically exported from code.google.com/p/box2d
0 stars 0 forks source link

Collision pushes body into shape #304

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I came across a case where the shape of a polygon seems to be causing some 
strange collision reaction. In the left of the screenshots below, the long body 
is about to fall on the small body lying on the ground. Almost as soon as they 
collide, the small body is pushed upwards through the large body, to rest on 
top of it about 5 steps later, as in the right screenshot.

The problem seems to be related to the shapes here, because I found that it did 
not happen if I removed the bevelled corners of the large body, so that it was 
rectangular. In fact, even a small change in the vertices of any of these 
polygons involved seemed to often make the problem go away. I think it has 
something to do with how shallow the angle is between the bevelled corners of 
the large body, and the lower edge of it.

I have attached the minimal case, and also the original situation in which I 
discovered it, which would be a test case to see if any bugfix has worked, 
because it has dozens of those small bodies (they are tank tracks) which were 
all jumping up through the large body.

Original issue reported on code.google.com by iforc...@gmail.com on 2 Apr 2013 at 7:43

Attachments:

GoogleCodeExporter commented 8 years ago
This appears to have been fixed. I'm guessing my recent changes to the polygon 
SAT fixed this.

Original comment by erinca...@gmail.com on 28 Oct 2013 at 5:29