When the physics are updated from the graphics, subtract the

graphical offset again to make sure physics and graphics are in sync.
This commit is contained in:
hiker 2014-01-24 23:46:52 +11:00
parent 93cb4b2090
commit fb8347e135

View File

@ -187,7 +187,7 @@ void PhysicalObject::move(const Vec3& xyz, const core::vector3df& hpr)
irr::core::quaternion tempQuat(mat);
q = btQuaternion(tempQuat.X, tempQuat.Y, tempQuat.Z, tempQuat.W);
btTransform trans(q,xyz);
btTransform trans(q,(btVector3)xyz-quatRotate(q,m_graphical_offset));
m_motion_state->setWorldTransform(trans);
} // move