Page MenuHome

BGE Cleanup: remove dead code at SetCenterOfMassTransform
ClosedPublic

Authored by Jorge Bernal (lordloki) on May 28 2015, 5:46 PM.

Diff Detail

Repository
rB Blender

Event Timeline

Jorge Bernal (lordloki) retitled this revision from to BGE Cleanup: remove dead code at SetCenterOfMassTransform.
Jorge Bernal (lordloki) updated this object.
Thomas Szepe (hg1) edited edge metadata.
This revision is now accepted and ready to land.May 31 2015, 9:31 AM
Porteries Tristan (panzergame) edited edge metadata.

It looks good to me, but i want to know what do functions setInterpolationLinearVelocity and setInterpolationAngularVelocity ?

Does this mean I can set a new center of mass in game for a compound rigid body shape?

(I could cry)

Does this mean I can set a new center of mass in game for a compound rigid body shape?

(I could cry)

If you read the post / code body, it's just removing unused / non functional code.

It looks good to me, but i want to know what do functions setInterpolationLinearVelocity and setInterpolationAngularVelocity ?

Basically, it seems that iniatially was taken the implementation of setCenterOfMassTransform as a guide to implement something similar for non-rigidbodies but it was forgot

void btRigidBody::setCenterOfMassTransform(const btTransform& xform)
{
 
         if (isKinematicObject())
         {
                m_interpolationWorldTransform = m_worldTransform;
         } else
        {
                m_interpolationWorldTransform = xform;
        }
        m_interpolationLinearVelocity = getLinearVelocity();
        m_interpolationAngularVelocity = getAngularVelocity();
        m_worldTransform = xform;
        updateInertiaTensor();
}
This revision was automatically updated to reflect the committed changes.