AramCP Posted November 20, 2016 Share Posted November 20, 2016 Hi, i want to make an overlap between my player sprite and some tiles from a tiled map. This is how it looks now: http://prntscr.com/d9j4bc And i want to posicionate te player behind the trees. I tried with the juego.physics.arcade.overlap(jugador, layer2); but as expected, it doesnt work. Link to comment Share on other sites More sharing options...
nazimboudeffa Posted November 20, 2016 Share Posted November 20, 2016 i am on the same issue with a fork of the game Rabbit Warrior, and i want to do it from scratch so it should take about two or three days to do something like this the feature is to create a layer for the overlaped tiles (i mean the sprite can be under them) Link to comment Share on other sites More sharing options...
AramCP Posted November 20, 2016 Author Share Posted November 20, 2016 1 hour ago, thefailtheory said: the feature is to create a layer for the overlaped tiles (i mean the sprite can be under them) Saying that you solved my problem xD. I created another layer for the overlaped tiles, and defined it under the character, making the layer to be above him. layer1 = map.createLayer('Capa1'); layer2 = map.createLayer('Capa2'); layer3 = map.createLayer('Capa3'); layer1.resizeWorld(); jugador = juego.add.sprite(1000, 930, 'red'); layer4 = map.createLayer('Capa4'); //As you can see i create the layer under the sprite. map.setCollisionBetween(46, 47, true, layer2); map.setCollisionBetween(95, 101, true, layer3); map.setCollisionBetween(32, 38, true, layer3); map.setCollisionBetween(102, 105, true, layer3); map.setCollisionBetween(81, 84, true, layer3); map.setCollisionBetween(60, 63, true, layer3); map.setCollisionBetween(69, 73, true, layer3); map.setCollisionBetween(48, 51, true, layer3); map.setCollisionBetween(6, 10, true, layer3); Yeah, and now it works, the next step is to make a grid-movement system, wish me good luck, cuz i will need it nazimboudeffa 1 Link to comment Share on other sites More sharing options...
nazimboudeffa Posted November 20, 2016 Share Posted November 20, 2016 so good luck i am here and on stackoverflow.com if you want to discuss features Link to comment Share on other sites More sharing options...
Recommended Posts