phaser-slopes
phaser-slopes copied to clipboard
Phaser 3.60.0 and Matter 0.18.0 compatibility
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
SATmodule toCollision - Changed
Collision.collides()to returnnullwhen 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.