diff --git a/packages/entity/traits/mobile.trait.js b/packages/entity/traits/mobile.trait.js index fcaed6c..d3ad7d1 100644 --- a/packages/entity/traits/mobile.trait.js +++ b/packages/entity/traits/mobile.trait.js @@ -30,7 +30,7 @@ export class Mobile extends decorate(Trait) { return { moveFor: (duration) => { - const direction = Math.floor(Math.random() * 4); + const direction = this.entity.direction; let resolve; const promise = new TickingPromise(_resolve => resolve = _resolve); promise.ticker = (elapsed) => {