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