Game.physics.arcade.intersects in Phaser 3?

In Phaser 2
game.physics.arcade.intersects(body1,body2);

How about this method in Phaser 3
I try
this.physics.add.collider.intersects(body1,body2);
but not work , anyidea?? THX

I think you might be looking for https://photonstorm.github.io/phaser3-docs/Phaser.Physics.Arcade.Factory.html#overlap__anchor

Thank you for reply.
I would to covert the following project to phaser3

it use game.physics.arcade.intersects to handle when hero stand on slope.
I try to use collider and overlap in phaser 3, but still not work, thx
any idea

@snowbillr is right. What you need is overlap: overlap(object1, object2 [, collideCallback] [, processCallback] [, callbackContext]).

But do not use it in update. define it in the create.
Also include some playground, online demo with code, of your progress and what have you tried so we can help better.

I need a babylonjs playground like centralized playground here. Though jsfiddle is perfect. I have a base playground here I use for phaser questions/answers. You can fork it.

Thanks, I upload my project to jsfiddle
https://jsfiddle.net/0m8rL13y/1/

of download full project attachment
slope.zip (244.6 KB)

My full code thank you very much, I try to make hero stand on slope platform
but finally not successfully…
Full code

var game;
var heroSpeed = 150;
var heroGravity = 400;
var inSlope = false;
var config = {
  width: 480,
  height: 320,
  backgroundColor: 0x000000,
  scene: {
        preload: preload,
        create: create,
        update: update
    },
  physics: {
    default: "arcade",
    arcade:{
        gravity:{
          y: 400
        },
        debug: true,
        debugShowVelocity: false
    }
  }
}


window.onload = function() {
	 game = new Phaser.Game(config);
}

function preload ()
{
          this.load.spritesheet("hero", "hero.png", { frameWidth: 20, frameHeight: 32 });
          this.load.image("floor", "floor.png");
          this.load.image("slope", "slope.png");
          this.load.image("big", "big.png");
}
function create ()
{
 
          this.floor = this.physics.add.image(190, config.height - 66, "floor");
//          this.floor.setOrigin(0);
          this.floor.setImmovable(true);
          this.floor.body.allowGravity = false;

          this.big = this.physics.add.sprite(config.width -100, config.height - 132, "big");
          this.big.setImmovable(true);
          this.big.body.allowGravity = false;

          this.slope = this.physics.add.sprite(config.width - 200, config.height - 132, "slope");
          this.slope.setImmovable(true);
          this.slope.body.allowGravity = false;

          this.hero = this.physics.add.sprite(32, config.height / 2, "hero");
          this.hero.setCollideWorldBounds(true);

          this.hero.goingRight = false;
          this.hero.goingLeft = false;

          this.hero.body.gravity.y = heroGravity;
          this.g = false;

       
           
          this.rightKeyPressed = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.D);
          this.leftKeyPressed = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.A); 
//    https://phaser.io/examples/v3/view/input/keyboard/add-single-key
          this.rightKeyPressed.on('down', function (key, event) {
               this.hero.goingRight = true;     

          }, this);
          this.rightKeyPressed.on('up', function (key, event) {
               this.hero.goingRight = false;     
  
          }, this);
         this.leftKeyPressed.on('down', function (key, event) {
               this.hero.goingLeft = true;     
  
          }, this);
          this.leftKeyPressed.on('up', function (key, event) {
               this.hero.goingLeft = false;     

          }, this);

    
          this.physics.add.collider(this.hero, this.floor);
          this.physics.add.collider(this.hero, this.big);
          var ths = this;
          this.physics.add.overlap(this.hero, this.slope, function(b1, b2) {
        	  var dX = ths.hero.x + ths.hero.width / 2 - ths.slope.x/2;
              
          ths.hero.body.gravity.y = 0; 
          ths.hero.y = ths.slope.y + ths.slope.height - ths.hero.height / 2 - dX;
        });

     }
    
  function update ()
{

         this.hero.body.gravity.y = heroGravity;   

          if(this.hero.goingRight && !this.hero.goingLeft){
//               this.hero.animations.play("walkRight", 10, true);
               this.hero.body.velocity.x = heroSpeed;
//               this.hero.idleFrame = 0;     
          }
          else{
               if(!this.hero.goingRight && this.hero.goingLeft){
//                    this.hero.animations.play("walkLeft", 10, true);
                    this.hero.body.velocity.x = -heroSpeed;
//                    this.hero.idleFrame = 4;      
               }
               else{
//                    this.hero.frame = this.hero.idleFrame;  
                   this.hero.body.velocity.x = 0;  
                   this.hero.body.gravity.y = 0;    
               }      

     }  
  
}

That is better. But I see this since the assets server you use does not allow CORS for jsfiddle at least:
Ekran Resmi 2019-12-14 ÖS 4.02.53

Your overlap definition looks correct. You can improve it even by using the last parameter to overlap, callbackContext, this instead of passing it manually with an obscured name which totally correct though:

this.physics.add.overlap(this.hero, this.slope, function(b1, b2) {
        var dX = this.hero.x + this.hero.width / 2 - this.slope.x/2;
              
        this.hero.body.gravity.y = 0; 
        this.hero.y = this.slope.y + this.slope.height - this.hero.height / 2 - dX;
}, null, this);

sorry,
Thank for your reply, i have changed it
Please find the attached file for your full project, thank you very much
slope.zip (244.6 KB)