How to see if a sprite is overlapping with a group in phaser

Hello, I would like to know how to see if a sprite is overlapping with a group in an if statement in phaser 3. I would like it to look like this.

if (sprite is overlapping with any member of a certain group)
{
__console.log(“sprite is overlapping with a member of this group!”)
}

If the sprite and group members are Arcade Physics enabled:

if (this.physics.overlap(sprite, group)) {}
1 Like