Hi,
I have the following code to check collisions for ‘playerMissiles’.
the collidercallback takes 2 parameters as the objects 1 & 2 colliding but the order of these objects is different, as you see in the 2 examples below.
Why does the order changes ?
Details:
Ex1: I’m checking collision between playerMissiles(physics.group) and platforms(tileset layer)
Ex2: I’m checking collision between playerMissiles(physics.group) and blockWallsSpawner.group(staticGroup)
> Ex.1: this.physics.add.collider(this.platforms, this.playerMissiles, (missile, platform)=>{this.handleMissileHit(missile, platform)}, null, this);
>
> Ex. 2: this.physics.add.collider(this.playerMissiles, this.blockWallsSpawner.group, (wall, missile)=>{this.handleMissileHit(wall, missile)}, null, this);