Collide on world bounds with specific members of a group

Hi, so i have a group on a grid and i am trying to collide the last wave of the group with the left bound of the world.

Do you have an idea how i can make that happen?

    //Add enemie1 event
    this.enemie1 = this.physics.add.group({
        classType: Phaser.Physics.Arcade.Image,
        key: Resources.image.enemie1.key,
        visible: true,
        active: true,
        repeat: 44,
        setScale: {
            x: Settings.game.SCALE*0.00013,
            y: Settings.game.SCALE*0.00013,
        },
        gridAlign:
        {
        width: 5,
        height: 9,
        cellWidth: Settings.game.CENTRE_X*0.2,
        cellHeight:Settings.game.CENTRE_Y*0.2,
        position: Phaser.Display.Align.CENTER,
        x: Settings.game.CENTRE_X*-0.87,
        y: Settings.game.CENTRE_Y*0.155
        }});
        this.enemie1.setVelocityX(Config.settings.enemie1Velocity*Settings.game.WIDTH*0.001357)

So this is the group and it is moving in positive X direction and i want to make something happen when the last wave of the group collide with the left world bound

var left = this.physics.world.bounds.left;

if (this.enemie1.getChildren().every((e) => e.x > left)) {
  // …
}

Samme, i have another question, when i tried the code you give on update() function
it falls on infinity loop, what if i want to get only the last enemie of the group and set collider for that enemie, how can i achieve that?

i am using this collider, thanks to the code you give. (I change to collider approach to not use the update() function, but i think it’s the same thing)

this.enemie1.getChildren().every((e) => e.body.world.on(‘worldbounds’,function(){
this.enemie1.clear(true,true)
}.bind(this)))

Since

getChildren()

returns an array, you can access to specific members like this,

this.enemie1.getChildren()[0]