phaser: Matter - gameObject.emit is not a function

On Phaser 3 matterJs examples, like this one: http://labs.phaser.io/view.html?src=src\game objects\tilemap\collision\matter platformer with wall jumping.js , when thow bodies collides we receive this error: i.gameObject.emit is not a function

Looking on the source code file: MatterCollisionEvents.js

if (bodyA.gameObject) {
  // bodyA.gameObject.emit('collide', bodyA, bodyB, pair)
      matter.Events.trigger('collide', bodyA, bodyB, pair)
 }

if I replace the commented line with code below it works without error. Is it an issue or am I doing something wrong?

Thanks

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15

Most upvoted comments

Is there a timeline for when 3.23.0-beta1 will be published to NPM? At the moment I’m using a manually built version of Phaser which works but makes it harder to use typings (as it’s not installed in node_modules).