refactor: ticking change snaps position

This commit is contained in:
cha0s 2019-04-12 12:27:32 -05:00
parent d09da37dc7
commit 9353a91012

View File

@ -96,6 +96,11 @@ class PositionedBase extends Trait {
listeners() { listeners() {
return { return {
isTickingChanged: () => {
// Snap position on ticking change.
this._position = this.serverPosition;
},
tick: (elapsed) => { tick: (elapsed) => {
if (!this.serverPositionDirty) { if (!this.serverPositionDirty) {
return; return;