phaser-slopes icon indicating copy to clipboard operation
phaser-slopes copied to clipboard

Phaser 3.60.0 and Matter 0.18.0 compatibility

Open hexus opened this issue 3 years ago • 0 comments

Matter.js 0.18.0, and downstream Phaser 3.60.0-beta.4, have introduced some breaking changes to collision handling, albeit in the name of optimisation.

Fix these incompatibilities in their entirety and try to incorporate as many of the optimisations as possible.

0.2.0-beta already addresses two basic incompatibilities:

  • Renamed SAT module to Collision
  • Changed Collision.collides() to return null when a pair does not collide

But there are further incompatibilities, currently. In my testing, the collisionactive event isn't emitting properly in Phaser when collisions are resolved by the plugin, and this is likely related to Matter's collision pair optimisations in the Resolver module. Currently, the collisionstart event is emitted repeatedly instead.

hexus avatar Mar 11 '22 16:03 hexus