Page 1 of 1
simple collision detection in 2d
Posted: Mon Aug 28, 2006 5:49 am
by fork
What advice can you people give me for simple collision detection in 2d? For example, say I use bisection to find a time that was very close to the collision. So now I have two polygons that are almost touching. How can I generate the contact set from this? I am looking for the simplest thing possible. Speed is not an issue.
Posted: Mon Aug 28, 2006 4:38 pm
by Erin Catto
If you intend to allow overlap (which I recommend), then the separating axis test can work well. This might help you:
http://www.gphysics.com/files/GDC2006_ErinCatto.zip
Posted: Mon Aug 28, 2006 9:56 pm
by fork
the nonoverlapping condition is necessary to use LCP.
Posted: Tue Aug 29, 2006 5:16 am
by Erin Catto
If you use Baumgarte stabilization, it is quite easy to allow for overlap in an LCP formulation. I do not know of a successful physics engine that has completely eliminated overlap.