mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
Correction to interpolation/warp issue caused by using the wrong variable.
This commit is contained in:
parent
04adb9f240
commit
cfd15d47e4
|
|
@ -404,8 +404,7 @@ U32 Entity::packUpdate(NetConnection *con, U32 mask, BitStream *stream)
|
|||
//mathWrite(*stream, getPosition());
|
||||
mathWrite(*stream, mPos);
|
||||
|
||||
//mathWrite(*stream, getRotation());
|
||||
mathWrite(*stream, getRotation().asEulerF());
|
||||
mathWrite(*stream, getRotation());
|
||||
|
||||
mDelta.move.pack(stream);
|
||||
|
||||
|
|
@ -502,10 +501,7 @@ void Entity::unpackUpdate(NetConnection *con, BitStream *stream)
|
|||
|
||||
RotationF rot;
|
||||
|
||||
EulerF eRot;
|
||||
mathRead(*stream, &eRot);
|
||||
|
||||
rot = RotationF(eRot);
|
||||
mathRead(*stream, &rot);
|
||||
|
||||
mDelta.move.unpack(stream);
|
||||
|
||||
|
|
@ -602,7 +598,8 @@ void Entity::unpackUpdate(NetConnection *con, BitStream *stream)
|
|||
mDelta.posVec = (cp - mDelta.pos) / mDelta.dt;
|
||||
QuatF cr;
|
||||
cr.interpolate(mDelta.rot[1], mDelta.rot[0], mDelta.dt);
|
||||
mDelta.rot[1].interpolate(cr, pos, mDelta.dt / dt);
|
||||
|
||||
mDelta.rot[1].interpolate(cr, rot.asQuatF(), mDelta.dt / dt);
|
||||
mDelta.rot[0].extrapolate(mDelta.rot[1], cr, mDelta.dt);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue