Chapelin Posted April 4, 2014 Share Posted April 4, 2014 Hi,I a newbie and i was fooling around with tileMap today.I found out that the separateTile function, from Phaser.Physics.Arcade throw an exception when i want to use game.physics.arcade.collide(player,layer), my layer coming from a map build with CSV file.It seems that tile.layer return an object when you initialize the map with a Json file, but it returns an integer when you use a CSV file. separateTile: function (i, body, tile) { [..] else if (tile.layer.callbacks[tile.index] && !tile.layer.callbacks[tile.index].callback.call(tile.layer.callbacks[tile.index].callbackContext, body.sprite, tile)) { // If it returns true then we can carry on, otherwise we should abort. return false; }My CSV seems ok, the game run without problems when i comment the collision test, and the layer.debug option show that some tiles are flagged as obstacle. Exemple : https://github.com/Chapelin/Bomber/blob/master/index.html Did anybody already had this problem ?Maybe i did something wrong ? (English is not my native language, so i'm sorry for the grammar mistakes) Link to comment Share on other sites More sharing options...
rich Posted April 8, 2014 Share Posted April 8, 2014 Yeah there is a github issue about this, so we'll look into it for the 2.0.3 release this week (if it doesn't make that one, it will definitely get covered for 2.0.4 in a fortnights time) Link to comment Share on other sites More sharing options...
Recommended Posts