lifesuxtr Posted June 28, 2018 Share Posted June 28, 2018 Hi guys i am trying to load a background image on canvas and position game camera on certain position and zoom level. This is the example background image: http://i.hizliresim.com/3zYlaA.png When i load the image it looks like this: I want to set position of background image (or camera ? )like this: Canvas is 800x600 const preload = () => { game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; game.load.image("background", "http://i.hizliresim.com/3zYlaA.png") }; const create = () => { cursors = game.input.keyboard.createCursorKeys(); background = game.add.tileSprite(0, 0, 800, 600, 'background'); // Creates a layer from the World1 layer in the map data. // A Layer is effectively like a Phaser.Sprite, so is added to the display list. } Link to comment Share on other sites More sharing options...
Recommended Posts