0
\$\begingroup\$

I am trying to use the Minimum Translation Vector (MTV) returned from the SAT algorithm for simple collision response. Please see the example below.

enter image description here

By separating the colliding boxes by moving the black box along the MTV, the box is now colliding with the other green box below. Moving the black box along the MTV for the collision with this new box then brings the box back to colliding with the first box, and an infinite cycle of trying to separate the boxes begins.

Am I missing something, or is collision response not possible using the MTV?

\$\endgroup\$
1
  • \$\begingroup\$ This is exactly what happens in many physics engines when three or more colliders end up in a chain of contacts. You've probably seen the effects in games, where objects that get pinched between two colliders start to vibrate - as the solver tries pushing them one way on one tick, then the other way on the next tick, until eventually the collider works its way into a non-intersecting position. Solving collisions by rewinding along the velocity can help solve some of those cases, but can still run into situations where correcting one problem causes another, and we have to iterate our way out. \$\endgroup\$ – DMGregory Oct 10 '20 at 19:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.