In this function of ndIntersections.h
- Code: Select all
inline ndFloat32 dBoxDistanceToOrigin2 (const ndVector& minBox, const ndVector& maxBox)
{
dAssert(maxBox.m_x >= minBox.m_x);
dAssert(maxBox.m_y >= minBox.m_y);
dAssert(maxBox.m_z >= minBox.m_z);
const ndVector mask (((minBox * maxBox) > ndVector::m_zero) & ndVector::m_triplexMask);
const ndVector dist (maxBox.Abs().GetMin (minBox.Abs()) & mask);
return dist.DotProduct(dist).GetScalar();
}
We hit those assert every time that we spawn AI vehicles to new locations in the world. What we do is we have a spawn area around the human operated vehicle and spawn AI vehicles in the area to keep that area full of traffic. When the AI reaches the limit of the spawn area, they are moved to a new location somewhere in the spawn area again. There is a height field that is connected to the AI vehicle that moves around on the terrain as the vehicle moves around. We have had a long thread on the height field bumps in a previous thread.
Should we be doing something different when moving the rigid bodies? Or is it safe to comment out those asserts? When I run our application in release (which will ignore those asserts) then everything still works as expected.