Skip to content

Commit

Permalink
Check for collisions even when not in motion.
Browse files Browse the repository at this point in the history
  • Loading branch information
amyjko committed Mar 4, 2024
1 parent 97f2dde commit 82239ff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Dates are in `YYYY-MM-DD` format and versions are in [semantic versioning](http:
- Account for documented expressions in bind recurrence relations.
- More consistently concretize name types in binds.
- [#402](https://github.com/wordplaydev/wordplay/issues/402): Fixed defect in page loading test.
- Check for collisions even when there's no temporal stream, to allow for objects to collide even when not in motion.

## 0.9.34 2024-02-24

Expand Down
6 changes: 6 additions & 0 deletions src/runtime/Evaluator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,12 @@ export default class Evaluator {
this.editSource(latest);
}

// Update the physics engine to see if there are any collisions.
// We do this here at the end of a program evaluation just in case
// there aren't any temporal streams that tick the physics engine.
// based on time.
if (this.scene) this.scene.physics.tick(0);

// Notify observers.
this.broadcast();
}
Expand Down

0 comments on commit 82239ff

Please sign in to comment.