Jump to content

Problem with collision Tilemap


Recommended Posts

Hi, i'm having such a hard time on set collision between player and tilemap

I set the setCollisionBetween with the .createLayer but i cant make the player.body.touching.down works, and the body.blocked.down, the player falls and stop at the layer as should be, but these two bool were never set to true, its like the player was laying on nothing, here is some code as i'm trying to figure it out. I tryed everything i saw at the internet but nothing worked.

at create()

     map = game.add.tilemap('mapa');
     map.addTilesetImage('tilefinal', 'tilefinal');
    layer = map.createLayer('cenario');
    layer.debug = true;

at update()


     game.add.text(32, 300, 'Ground OK',{fill:'white'});


Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...