Improve physics body synchronisation

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11673 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria
2012-10-12 22:38:35 +00:00
parent dab73fa8cf
commit c76c418ef7

View File

@@ -324,8 +324,11 @@ void ThreeDAnimation::update(float dt)
// Now update the position of the bullet body if there is one:
if(m_body)
{
hpr = DEGREE_TO_RAD*hpr;
btQuaternion q(hpr.X, hpr.Y, hpr.Z);
Vec3 hpr2(hpr);
hpr2.degreeToRad();
btQuaternion q;
q.setEuler(hpr2.getY(), hpr2.getX(), hpr2.getZ());
Vec3 p(xyz);
btTransform trans(q,p);
m_motion_state->setWorldTransform(trans);