From 0c15cd0f94eb25c2c1247643c001ef3b63c9942f Mon Sep 17 00:00:00 2001 From: cha0s Date: Tue, 20 Apr 2021 06:26:00 -0500 Subject: [PATCH] fix: timing --- packages/physics/src/traits/collider.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/physics/src/traits/collider.js b/packages/physics/src/traits/collider.js index b3a328a..b957df4 100644 --- a/packages/physics/src/traits/collider.js +++ b/packages/physics/src/traits/collider.js @@ -146,12 +146,11 @@ export default (latus) => class Collider extends decorate(Trait) { async pushCollisionTickingPromise(codeOrUri, other, incident) { const {Script} = latus.get('%resources'); - const script = await Script.load(codeOrUri, { - entity: this.entity, + this.entity.addTickingPromise(Script.loadTickingPromise(codeOrUri, { + ...this.entity.contextOrDefault, incident, other, - }); - this.entity.addTickingPromise(script.tickingPromise()); + })); } releaseAllCollisions() {