mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-24 00:53:47 +00:00
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:
commit
3a73344abb
36 changed files with 357 additions and 46 deletions
|
|
@ -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));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue