I have my tiles marked with a color to be sure that they are enabled with physics and I have the standard stuff on my sprite. When I add this line of code
this.physics.add.collider(player, worldLayer);
to enable physics, my sprite freezes. I get this error:
Uncaught TypeError: Cannot read properties of undefined (reading ‘add’)
But why it is needed to use plugin ,as this code basically using arcade physics and it is already initialized in the config.So its just an error for a reference of scene or enabling physics on gameobject.