Persistent Manifold & Contact breaking threshold
Posted: Wed Aug 05, 2015 9:34 pm
I'm attempting to switch my 2D physics simulation to using GJK/EPA for collision detection, thus I have implemented a persistent manifold which adds at most one new contact point per step. However I'm running into slight instability due to the contact breaking threshold.
My understanding is that a contact point should be removed once the world space points on both bodies drift apart tangentially by some threshold, but this causes my bodies to pop inside each other on the frame that the contact is removed. A new contact point will then be added on the next frame, but at low time steps, this causes a noticeable pop.
The only thing I can think of to solve this issue is to replace the existing contact point before the threshold is reached, but the GJK algorithm might be returning points for the other contact point if it is deeper (I'm only keeping 2 contact points as this is a 2D engine).
How are others dealing with this issue? Is my understanding flawed?
My understanding is that a contact point should be removed once the world space points on both bodies drift apart tangentially by some threshold, but this causes my bodies to pop inside each other on the frame that the contact is removed. A new contact point will then be added on the next frame, but at low time steps, this causes a noticeable pop.
The only thing I can think of to solve this issue is to replace the existing contact point before the threshold is reached, but the GJK algorithm might be returning points for the other contact point if it is deeper (I'm only keeping 2 contact points as this is a 2D engine).
How are others dealing with this issue? Is my understanding flawed?