petersbob Posted March 7, 2015 Share Posted March 7, 2015 I have a player that is walking on a layer of my tilesheet. Everything will work, but every once in a while my player will fall or jump through the layer. I feel my problem may be in the setup of my collision. I don't understand what setCollisionBetween and setCollisionByExclusion mean exactly and why I would use one over the other. This is what I currently have that sort of works.this.physics.startSystem(Phaser.Physics.ARCADE); this.gameover = false; this.map = this.add.tilemap('level1'); this.map.addTilesetImage('tiles', 'gameTiles1'); this.map.addTilesetImage('simples_pimples', 'gameTiles2'); this.map.addTilesetImage('trees', 'gameTiles3'); this.add.image(0, 0, 'bg'); //this.objectsLayer = this.map.createLayer('objects'); this.blockedLayer = this.map.createLayer('Platforms'); this.backgroundLayer = this.map.createLayer('Background'); //this.map.setCollisionBetween(0, 2000, true, this.blockedLayer this.map.setCollisionBetween(0, 2000);and in my updatethis.physics.arcade.collide(this.player, this.blockedLayer ); Link to comment Share on other sites More sharing options...
petersbob Posted March 24, 2015 Author Share Posted March 24, 2015 Fixed my issue. It was an issue of tunneling. To fix it I changed the tile bias to 17.this.game.physics.arcade.TILE_BIAS = 17; Link to comment Share on other sites More sharing options...
Recommended Posts