Collider Callback parameter order

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);

Phaser tries to check body vs something else. So it will switch a tile layer and a physics group. I agree it should switch them back for the callback, but it doesn’t :slight_smile:
Not sure about the second one, group vs group shouldn’t switch, maybe ‘.group’ isn’t really a group?