Ansimuz Posted May 12, 2018 Share Posted May 12, 2018 In phaser 2 to simulate parallax background when the camera moved I used: background.tilePosition.x = this.layer.x * -0.2; Heres the complete logic in Phaser 2 // create globalMap = game.add.tilemap("map"); globalMap.addTilesetImage("tileset"); this.layer = globalMap.createLayer("Tile Layer 1"); this.layer.resizeWorld(); background = game.add.tileSprite(0,0, gameWidth, gameHeight, "background"); background.fixedToCamera = true; // update background.tilePosition.x = this.layer.x * -0.2; How would be the best way to do it in Phaser 3? parallax_bg.tilePositionX = ? Link to comment Share on other sites More sharing options...
PixelPicoSean Posted May 12, 2018 Share Posted May 12, 2018 Yes you can use "tilePositionX = -camera.scrollX" just like that, but for a parallel background I think you can simply set "scrollFactorX" of it instead. Link to comment Share on other sites More sharing options...
Recommended Posts