|<<prev 2013-02-26 next>>|
I ran into the dreaded TimeOfImpact (TOI) infinite loop recently using Box2D (the Box2DAS3 port). Digging into it there are a few places that iterate indefinitely in the box2d TOI code: b2World::SolveTOI and b2TimeOfImpact::TimeOfImpact. TimeOfImpact does an iterative root finding algorithm that attempts to converge to a solution but there is a situation where the solution is something like 1/infinity so it just gets smaller and smaller and smaller so you have numbers like 1e-18 and so on. Another problem has to do with b2WeldJoint which appears to not work correctly when using a static body. This is because with a static body the m_sweep position is not set and there is no density. What is the solution?
Hope that helps and I am currently on the market for contracting/consulting so feel free to reach out :)