Added comment.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10707 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk
2012-01-23 06:06:17 +00:00
parent 0836380d9e
commit fd4eb3fa5e

View File

@@ -453,6 +453,12 @@ void btKart::updateVehicle( btScalar step )
m_additional_rotation.getZ()*dt);
t.setRotation(t.getRotation()*add_rot);
m_chassisBody->setWorldTransform(t);
// Also apply the rotation to the interpolated world transform.
// This is important (at least if the rotation is only applied
// in one frame) since STK will actually use the interpolated
// transform, which would otherwise only be updated one frame
// later, resulting in a one-frame incorrect rotation of the
// kart, or a strongly 'visual jolt' of the kart
btTransform &iwt=m_chassisBody->getInterpolationWorldTransform();
iwt.setRotation(iwt.getRotation()*add_rot);
m_time_additional_rotation -= step;