Support get body state for deformable objects so that it retrieves the best fit rigid transform

This commit is contained in:
Xuchen Han
2020-03-18 17:11:20 -07:00
parent 3c9dde54a2
commit cab8b84a8f
3 changed files with 10 additions and 3 deletions
@@ -7482,7 +7482,8 @@ bool PhysicsServerCommandProcessor::processRequestActualStateCommand(const struc
serverCmd.m_sendActualStateArgs.m_rootLocalInertialFrame[6] =
body->m_rootLocalInertialFrame.getRotation()[3];
btVector3 center_of_mass(sb->getCenterOfMass());
btVector3 center_of_mass(sb->getCenterOfMass());
sb->updateTransform();
btTransform tr = sb->getWorldTransform();
//base position in world space, cartesian
stateDetails->m_actualStateQ[0] = center_of_mass[0];