diff --git a/packages/entity/src/traits/mobile.js b/packages/entity/src/traits/mobile.js index fb88151..b92b3b0 100644 --- a/packages/entity/src/traits/mobile.js +++ b/packages/entity/src/traits/mobile.js @@ -167,11 +167,9 @@ export default () => class Mobile extends decorate(Trait) { if (!this.entity.isMobile) { return; } - this.entity.applyMovement(Vector.scale( - Vector.saturate(vector), - this.speed, - )); - this.entity.emit('movementRequest', this.#appliedMovement); + const movement = Vector.scale(Vector.saturate(vector), this.speed); + this.entity.applyMovement(movement); + this.entity.emit('movementRequest', movement); }, };