I have a problem, i need to detect when 2 containers collide, but my collision is detected before the objects even start moving, that is before there is any collision on screen. The stopMovement() callback is executed right away, before any collision happens. Any phaser experts to help?
const move1 = setInterval(() => {
container1.x += 1
}, 20);
const move2 = setInterval(() => {
container2.x -= 1
}, 20);
this.gameInstance.physics.add.collider(container1, container2, this.stopMovement(move1, move2), null, this)