Hello. I do 2 tilemap , on one land, on another ladder. I do gravity and everything works fine with the ground, but I don’t know how to check the contact with the tile ladder. I create it like this:

//Ground map.ground = game.add.tilemap('map-ground', 32, 32); map.ground.addTilesetImage('tileset'); layer.ground = map.ground.createLayer(0); layer.ground.setScale(3); map.ground.setCollision(174);//ID земли //Ladders&Hide map.laddersAndHide = game.add.tilemap('map-ladders&hide', 32, 32); map.laddersAndHide.addTilesetImage('tileset'); layer.laddersAndHide = map.laddersAndHide.createLayer(0); layer.laddersAndHide.setScale(3); map.laddersAndHide.setCollision(168);// ID лестницы 

Further did such checks:

 game.physics.arcade.collide(player, layer.ground); game.physics.arcade.collide(player, layer.laddersAndHide, function () { console.log(true); }); 

whereas I understood the collision with the ground was blocked by a collision with a ladder, because when I deleted the collision with the ground, the ladder worked (though not as I should, I could not pass through it). so I tried:

 game.physics.arcade.overlap(player, layer.laddersAndHide, testFunc, null, this); 

then the testFunc function was executed continuously. Perhaps due to the fact that I did not specify a specific id in the layer. But how can ukzat? now stopped at this

 game.physics.arcade.collide(player, [layer.ground, layer.laddersAndHide], function () { console.log(this); }); 

I think maybe you can somehow put a check on which layer was the contact?

    0