Pau Posted July 19, 2018 Share Posted July 19, 2018 Hello, I have design this car path with tiled editor: but when i load it in phaser i see this: It's like the tile rotation i made in tiled is no working in phaser. This is the code i use to load it the tilemap: function preload(){ this.load.tilemapTiledJSON('level1', 'map.json'); this.load.image('nombreDelTilesetEnPhaser', '../img/tiles.png'); } function create(){ map = this.make.tilemap({key:'level1'}); tileset = map.addTilesetImage('nombreDelTilesetEnTiled', 'nombreDelTilesetEnPhaser'); backgroundLayer = map.createStaticLayer('background', tileset,0,0); } How can i get the tiles rotation working in phaser as i can see on tiled editor? Thank you in advance. Link to comment Share on other sites More sharing options...
ol-web Posted July 19, 2018 Share Posted July 19, 2018 backgroundLayer = map.createDynamicLayer('background', tileset,0,0); PS why are you not using vars? it's a bad practice in javascript, you're polluting the global scope Link to comment Share on other sites More sharing options...
Pau Posted July 22, 2018 Author Share Posted July 22, 2018 Thank you ol-web! The variables i don't put var in front has global scope. That's right in my game. Link to comment Share on other sites More sharing options...
Pavel Mishin Posted February 12, 2019 Share Posted February 12, 2019 @Pau, Do you find the solution? Using dynamic layer instead of static, seems doesn't work for me. Link to comment Share on other sites More sharing options...
Recommended Posts