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:
parent
93cb4b2090
commit
fb8347e135
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user