fix: smoother lerp
This commit is contained in:
parent
c53a3308ee
commit
4db5fb1832
|
@ -127,10 +127,12 @@ class PositionedBase extends Trait {
|
|||
return;
|
||||
}
|
||||
if (Vector.equals(this._position, this.serverPosition)) {
|
||||
this.serverPositionDirty = false;
|
||||
return;
|
||||
}
|
||||
if (Vector.equalsClose(this._position, this.serverPosition, 0.1)) {
|
||||
this._position = this.serverPosition;
|
||||
this.serverPositionDirty = false;
|
||||
return;
|
||||
}
|
||||
const diff = Vector.sub(this.serverPosition, this._position);
|
||||
|
|
Loading…
Reference in New Issue
Block a user