kurhlaa Posted August 1, 2018 Share Posted August 1, 2018 Hello, If I have a tilemap with a dynamic layer, a player with collisions enabled with this layer - how do I manually check whether the player is overlapping specific tile? I try this way: scene.physics.world.enable(player); scene.physics.add.collider(player, layer); ... var tile = layer.getTileAtWorldXY(Xpos, Ypos, true); console.log(scene.physics.world.overlap(player, tile)); .. but I always get False printed, even if selected tile is right behind the player. Same result with calling collide(), same result if tile's index is -1 or something else. What am I missing? Link to comment Share on other sites More sharing options...
samme Posted August 2, 2018 Share Posted August 2, 2018 See setTileLocationCallback (56) in http://labs.phaser.io/edit.html?src=src\game objects\tilemap\collision\tile callbacks.js. Link to comment Share on other sites More sharing options...
Recommended Posts