kctang Posted November 2, 2014 Share Posted November 2, 2014 Hi, I loaded my tiles with game.physics.p2.convertTilemap() and it works. However, each tile is a square block and my "player" is floating on slanted tiles (similer to problem mentioned in here). Using Tiled editor's "Tile Collision Editor", i defined the polygon I want but Phaser does not seem to pick it up. Part of the exported JSON looks like this (tells me that the polyline was created): "tilesets":[ { "firstgid":1, "image":"tiles.png", "imageheight":374, "imagewidth":374, "margin":0, "name":"tiles", "properties": { }, "spacing":2, "tileheight":32, "tiles": { "57": { "objectgroup": { "draworder":"index", "height":0, "name":"", "objects":[ { "height":0, "name":"", "polyline":[ { "x":0, "y":0 }, { "x":32, "y":-32 }], "properties": { }, "rotation":0, "type":"", "visible":true, "width":0, "x":0, "y":32 }], "opacity":1, "type":"objectgroup", "visible":true, "width":0, "x":0, "y":0 } } }, "tilewidth":32 }, { "firstgid":122, "image":"items.png", "imageheight":270, "imagewidth":270, "margin":0, "name":"items", "properties": { }, "spacing":2, "tileheight":32, "tilewidth":32 }, { "firstgid":186, "image":"sprites.png", "imageheight":100, "imagewidth":238, "margin":0, "name":"sprites", "properties": { }, "spacing":2, "tileheight":32, "tilewidth":32 }]How do I load the tile's collision polyline/polygon in Phaser when loading the tiled layer? Link to comment Share on other sites More sharing options...
johann_dev Posted May 14, 2017 Share Posted May 14, 2017 Is there a solution to this problem? 3 years later Phaser's tilemap system still ignores the object properties defined in the collision editor. Link to comment Share on other sites More sharing options...
johann_dev Posted May 15, 2017 Share Posted May 15, 2017 bump Link to comment Share on other sites More sharing options...
Recommended Posts