Suppose I throw a tooth pick at a static sheet of paper. The tooth pick is moving and rotating very fast. I use conservative advancement to stop the tooth pick when it first touches the paper within some tolerance. Next I advance time and try to use conservative advancement again. However, the tooth pick starts out touching the paper (within tolerance) so I either freeze the tooth pick, or give up on conservative advancement and the toothpick rotates right through the paper (it only has one contact point).
Obviously freezing the tooth pick is not the solution, but it seems I can no longer use conservative advancement to prevent tunneling. I can start adding some predictive contact points, but this can get a bit messy with complex geometry.
Is there some sensible way to continue using conservative advancement on shapes that are already touching?
Conservative Advancement
-
- Posts: 316
- Joined: Fri Jul 01, 2005 5:29 am
- Location: Irvine
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Conservative Advancement
Hi Erin,
I already gave those suggestions in private communication:
Apart from this, you can safely enable continuous physics between dynamic versus static without many problems. When enabling continuous physics between dynamic objects you need to step the objects to the smallest time of impact. This can result in a big slow down, so you either terminate early (loose time) or use a scheme like Time Warp.
Are there any other concepts that were useful to get CCD and continuous physics to work in Box2D?
Thanks!
Erwin
I already gave those suggestions in private communication:
One approach to solve touching contact is to add use an allowed penetration. You can implement this using a margin (similar to GJK margins) or by calculating the time of impact using CCD on a smaller core shape. Then the regular contraint solver will recover from shallow penetration. I don't recommend disabling CCD at touching contact.However, the tooth pick starts out touching the paper (within tolerance) so I either freeze the tooth pick, or give up on conservative advancement and the toothpick rotates right through the paper (it only has one contact point).
Apart from this, you can safely enable continuous physics between dynamic versus static without many problems. When enabling continuous physics between dynamic objects you need to step the objects to the smallest time of impact. This can result in a big slow down, so you either terminate early (loose time) or use a scheme like Time Warp.
Are there any other concepts that were useful to get CCD and continuous physics to work in Box2D?
Thanks!
Erwin
-
- Posts: 117
- Joined: Fri Aug 12, 2005 3:47 pm
- Location: Newyork, USA
Re: Conservative Advancement
One thing you can do is adding the constraint that the toothpicks should not penetrate the paper "before it happen".