6Dof constraint not handling some cases

User avatar
jarno
Posts: 57
Joined: Tue Mar 16, 2010 1:42 am

6Dof constraint not handling some cases

Post by jarno »

I'm tracking down some strange behaviour in a Generic6DofConstraint. In some cases I'm getting invalid floating point numbers (#NaN, #IND, the usual floating point exceptions).

I've narrowed it down to btGeneric6DofConstraint::calculateAngleInfo(). It does not handle the case what axis0 and axis2 are parallel. The normalization of m_calculatedAxis[] then fails with a divide by zero, and the resulting invalid numbers then contaminate the rest of the simulation.

I believe this occurs when the z-axis of frame A of the constraint coincides with the x-axis of frame B.

---JvdL---