Disable velocity calculation in kinematic multibody mode by default

We haven't implemented this for the multi body joints. To be consistent, let's disable it for the base as well, and let user to set the velocities.
This commit is contained in:
WenlongLu
2020-12-14 17:19:27 -08:00
parent c377260d71
commit 62eb2f7788
3 changed files with 8 additions and 2 deletions

View File

@@ -37,6 +37,8 @@ void kinematicPreTickCallback(btDynamicsWorld* world, btScalar deltaTime)
btVector3 angularVelocity(0, 0.1, 0);
btTransformUtil::integrateTransform(groundBody->getBaseWorldTransform(), linearVelocity, angularVelocity, deltaTime, predictedTrans);
groundBody->setBaseWorldTransform(predictedTrans);
groundBody->setBaseVel(linearVelocity);
groundBody->setBaseOmega(angularVelocity);
static float time = 0.0;
time += deltaTime;