add the option to shift the applied force/torque for a multibody joint (mobilizer) to the joint frame origin

This commit is contained in:
erwin coumans
2015-06-25 15:09:35 -07:00
parent 6a282601cf
commit 3b4ad1cd5a
3 changed files with 22 additions and 11 deletions

View File

@@ -85,7 +85,7 @@ void TestHingeTorque::stepSimulation(float deltaTime)
for (int i=0;i<m_jointFeedback.size();i++)
{
b3Printf("Applied force B:(%f,%f,%f), torque B:(%f,%f,%f)\n",
b3Printf("Applied force at the COM/Inertial frame B[%d]:(%f,%f,%f), torque B:(%f,%f,%f)\n", i,
m_jointFeedback[i]->m_appliedForceBodyB.x(),
@@ -111,7 +111,7 @@ void TestHingeTorque::initPhysics()
createEmptyDynamicsWorld();
m_dynamicsWorld->getSolverInfo().m_splitImpulse = false;
m_dynamicsWorld->setGravity(btVector3(0,-1,-10));
m_dynamicsWorld->setGravity(btVector3(0,0,-10));
m_guiHelper->createPhysicsDebugDrawer(m_dynamicsWorld);
int mode = btIDebugDraw::DBG_DrawWireframe