DazZ Posted August 6, 2014 Share Posted August 6, 2014 Is there any way to give this...map = this.add.tilemap('map');map.addTilesetImage('map_tilesheet', 'maptiles');map.setCollisionByExclusion([6, 9, 18], 'platforms'); layer = map.createLayer('platforms');layer.resizeWorld();a collision group? Or do I have to have an object layer and draw out each part by hand if I'm going to use collision groups? As this does work finecollisionLayer = game.physics.p2.convertCollisionObjects(map,'collision');for(var tile in collisionLayer){ collisionLayer[tile].setCollisionGroup(platformCG); collisionLayer[tile].collides([playerCG, crateCG]); }but I'd like to not have to draw out each map by hand as I have some boxes that fit exactly into one tile and if I slip up they don't go into the gap perfectly like I want them to. That and it's just time consuming but I can't figure out a way of making the tiles collide like they did before I set collision groups. Link to comment Share on other sites More sharing options...
Recommended Posts