The user is performing a long ray cast on a scene, and an enemy with a collider collision shape is going into an infinite loop.
At line 1126, distance is equal to 3.1436167795842012e-09:
- Code: Select all
dgAssert (v.m_w == dgFloat32 (0.0f));
const dgFloat64 distance = v.DotProduct(v).GetScalar();
if (distance < dgFloat32 (1.0e-9f)) {
index = -1;
break;
}
At line 1149, distance1 is equal to 0.000996447168, so the loop breaks and goes to 1181.
- Code: Select all
const dgFloat32 distance1 = dir.DotProduct(wv).GetScalar();
if (distance1 < dgFloat64 (1.0e-3f)) {
normal = dir;
break;
}
Eventually, the logic hits this line:
- Code: Select all
v = ReduceTriangle (index);
break;
And the loop starts again, forever, causing the program to freeze.
The function is confusing to me, and I do not know what I should be looking for.