Resolves merging-order conflicts for the vehicle physics PR, as well as correcting cmake not blacklisting the componentGroup files if TORQUE_EXPERIMENTAL_EC was flipped off.

This commit is contained in:
Areloch 2016-06-05 19:17:34 -05:00
commit 3a73344abb
36 changed files with 357 additions and 46 deletions

View file

@ -442,3 +442,25 @@ void BtBody::findContact(SceneObject **contactObject,
}
}
}
void BtBody::moveKinematicTo(const MatrixF &transform)
{
AssertFatal(mActor, "BtBody::moveKinematicTo - The actor is null!");
U32 bodyflags = mActor->getCollisionFlags();
const bool isKinematic = bodyflags & BF_KINEMATIC;
if (!isKinematic)
{
Con::errorf("BtBody::moveKinematicTo is only for kinematic bodies.");
return;
}
if (mCenterOfMass)
{
MatrixF xfm;
xfm.mul(transform, *mCenterOfMass);
mActor->setCenterOfMassTransform(btCast<btTransform>(xfm));
}
else
mActor->setCenterOfMassTransform(btCast<btTransform>(transform));
}