wangshangxin / box2d

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

CCD problem #220

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
See the attached testbed file.

When a large heavy bullet plows through a bunch of smaller, lighter objects at 
high speeds, it appears to stutter as it goes through.  The CCD system seems to 
be giving up after only solving a small portion of the step (it's not entirely 
clear, but single-stepping makes it look like it might be solving only a single 
impact per step).

Obviously there needs to be a limit to the amount of computation CCD will do 
per step, but this doesn't appear to be tunable in the current implementation 
(b2_maxTOIContacts doesn't seem to affect this problem), so if it's possible 
and doesn't require a lot of algorithmic change, a good fix would be to make 
whatever is limiting this tunable in b2Settings.h.

Original issue reported on code.google.com by ewjor...@gmail.com on 10 Jul 2011 at 7:16

Attachments:

GoogleCodeExporter commented 9 years ago
The problem is the large number of contact points per fixture. We need a hash 
table to quickly look up contacts.

Original comment by erinca...@gmail.com on 27 Nov 2011 at 12:05

GoogleCodeExporter commented 9 years ago
I might be misinterpreting what you're saying (I'm not sure if you were 
explaining the source of the bug, or why a fix would be difficult), but just to 
be clear about what the bug in question is, the issue is not performance, but 
accuracy. The "stuttering" is equally visible when single-stepping. The box 
moves a fixed distance per frame up until it hits the cloud, and then it starts 
moving much less per frame, and then afterwards, it resumes at its initial 
velocity.

Original comment by ewjor...@gmail.com on 27 Nov 2011 at 4:21

GoogleCodeExporter commented 9 years ago
Hi, any progress on finding the cause of this issue?

Original comment by r...@1013games.com on 31 Jan 2012 at 11:20