free-language / box2d

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

b2TimeOfImpact Can Give False Positives #120

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
b2TimeOfImpact can give false positives when calling it manually. The
recent change you made culled a lot of these, but not all. I was working on
some test cases to give you when I stumbled onto a fix.

At lines 57 and 58 in b2TimeOfImpact.cpp you initialize xfA and xfB to the
sweep value from 0.0f, no matter what t1 was used. If you pass t1 in and
use that value instead, it works perfectly. (I've attached a patch with the
fix in case this was unclear.)

I ran into this working on the convex cast patch:
http://box2d.org/forum/viewtopic.php?f=3&t=4780 

Original issue reported on code.google.com by NagelBa...@gmail.com on 17 Apr 2010 at 8:08

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed. Thanks!

Original comment by erinca...@gmail.com on 18 Apr 2010 at 12:18