phaserjs / phaser

Phaser is a fun, free and fast 2D game framework for making HTML5 games for desktop and mobile web browsers, supporting Canvas and WebGL rendering.
https://phaser.io
MIT License
36.93k stars 7.08k forks source link

Matter Pause Issue | 3.85.0-beta.2 #6892

Closed philipgriffin closed 2 weeks ago

philipgriffin commented 3 weeks ago

Version

Description

Matter JS pausing for physics bodies appears broken. When pausing the game using this.matter.pause/resume(); physics appear paused but are not. Resuming results in the physics bodies jumping to the position they were intended to be at.

Example Test Code

https://phaser.io/sandbox/1ak3C6pp https://phaser.io/sandbox/WebdoebN

Additional Information

Steps to Reproduce

  1. Press space to pause.
  2. Press space to resume.

Expected outcome:

Physics body resumes from paused position.

Actual outcome:

Physics body jumps to position as if it were not paused.

photonstorm commented 2 weeks ago

Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.