Growler Posted February 1, 2018 Share Posted February 1, 2018 Pretty straightforward question: I want to draw my collision layers in Tiled, preferrably using the Polyline tool. I would use createFromObjects, but I don't really need the polyline to appear as a sprite, or appear at all (except for debug mode as a collision layer). Phaser: 2.6.2 Physics: Arcade Create() { ... map = game.add.tilemap('mario'); map.addTilesetImage('tileset', 'tiles'); layer = map.createLayer('Tile Layer 1'); boundary = map.objects.boundaries[0]; player = game.add.sprite(map.objects.mainPlayer[0].x, map.objects.mainPlayer[0].y, 'dude'); game.physics.arcade.enable(player); player.body.collideWorldBounds = true; ... } Update() { ... game.physics.arcade.collide(player, boundary); ... Link to comment Share on other sites More sharing options...
Growler Posted February 4, 2018 Author Share Posted February 4, 2018 Any thoughts here? Link to comment Share on other sites More sharing options...
Growler Posted February 6, 2018 Author Share Posted February 6, 2018 No ways to accomplish this other than box/sprite collision? MelonJS supports this out of the box and would expect Phaser to do so as well. I'm in the process of creating a quick demo to compare Phaser against other HTML5 game engines and need this to work. Link to comment Share on other sites More sharing options...
Recommended Posts