thiagoboeker Posted September 5, 2016 Share Posted September 5, 2016 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.resizeWorld(); map.setCollisionBetween(0,2); layer.debug = true; at update() game.physics.arcade.collide(player,layer); if(player.body.touching.down){ game.add.text(32, 300, 'Ground OK',{fill:'white'}); } Link to comment Share on other sites More sharing options...
Recommended Posts