That one is a sign of something going really wrong
- Code: Select all
bool dgCollisionCompound::dgNodeBase::BoxTest (const dgOOBBTestData& data) const
{
dgFloat32 separatingDistance = data.UpdateSeparatingDistance (data.m_aabbP0, data.m_aabbP1, m_p0, m_p1);
if (dgOverlapTest (data.m_aabbP0, data.m_aabbP1, m_p0, m_p1)) {
dgAssert (separatingDistance > dgFloat32 (1000.0f));
The is no AABB vs AABB or OBB vs OBB check in newton, instead all pairs for close objects are formed when each pair is in the same sector of the broad phase, then the closest distance of that pair is calculated when the contact joint is formed.
then after that, for each pair a closest distance is updated by the relative velocity of the two bodies, each time the distance is reduced by some value, the closest distance is recalculated. and the procedure keep going. when the distance is small enough then the joint is activated and contacts are calculated.
a distance of 1000 between a pair does not mean is wrong, but could be a sign of something wrong.
for example is possible a body enter a very big body, which is hollowed and the close distance is very big. in that case this is normal. But is also possible that a bug happen and an explosion made a body gain a huge velocity and the distance becomes huge.
what the reason is, is difficult to tell without more information.
Next time is happened, check the debug output and see if you see warning print out of bodies gaining huge velocities. For now we let that go.