Cannot read property 'collide' of undefined

Hi,
In the create function, not in update, try:

this.physics.add.collider(this.player, this.otherPlayers, (player, otherPlayer) => {
    console.log(player, otherPlayer)
}, null, this);
1 Like