|
|
@@ -161,6 +161,9 @@ void RigidBody::getWorldTransform(btTransform& worldTrans) const
|
|
|
|
|
|
void RigidBody::setWorldTransform(const btTransform& worldTrans)
|
|
|
{
|
|
|
+ if (!body_->isActive()) // Fix #2491
|
|
|
+ return;
|
|
|
+
|
|
|
Quaternion newWorldRotation = ToQuaternion(worldTrans.getRotation());
|
|
|
Vector3 newWorldPosition = ToVector3(worldTrans.getOrigin()) - newWorldRotation * centerOfMass_;
|
|
|
RigidBody* parentRigidBody = nullptr;
|