Assert Failure When Constraining MultiBody to Kinematic Body #4575
VladSmarandache
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In
btMultiBodyFixedConstraint
for example (but also in other multibody constraints), if A is a multibody and B is a kinematic body,m_rigidBodyB->getCompanionId()
returns -2 here:Once
fillMultiBodyConstraint
is called with an invalidm_solverBodyIdB
, it fails atbtSolverBody* bodyB = multiBodyB ? 0 : &data.m_solverBodyPool->at(solverConstraint.m_solverBodyIdB);
.If I pass a pointer to the solver into the constraint and replace the straight call to
m_rigidBodyB->getCompanionId()
with something likesolver->getOrInitSolverBody(*m_rigidBodyB, infoGlobal.m_timeStep)
, I get the correct behavior. With BT_THREADSAFE on, are kinematic bodies even supposed to have a companionId? Judging by the following block ingetOrInitSolverBody
, it doesn't look like it:Beta Was this translation helpful? Give feedback.
All reactions