eugenioclrc Posted April 13, 2014 Share Posted April 13, 2014 Hello to everyone!! I am making a small 2d rpg / rogue like game. I have make a map with two layers. One of the layers got the property collides. So i do this in the create method; map.layers.forEach(function(l){ var layer=map.createLayer(l.name); if(l.properties.hasOwnProperty('collides')){ map.setCollisionByExclusion([],true,layer); } layer.resizeWorld(); }); this.map=map; Then in the update method i add the collision;// 1 is the ground layerthis.physics.arcade.collide(this.hero, this.map.layers[this.map.getLayer('wall')]);I have make it work with other code, but why this isnt working? Link to comment Share on other sites More sharing options...
Recommended Posts