s4m_ur4i Posted December 5, 2016 Share Posted December 5, 2016 Is there a way to define the x/y = 0/0 Point in Phaser? I could not find anything on the forum / docu. So everything is aligned from 0/0 - I want to set a padding of "300" around the whole game. (example) So that the camera can freely move around. The game itself is centered. But there are also renderable object ins space like (-2590, 30) Anyway of doing that? I tried to set negative world bounds and to resize the world. It does nothing at all. Link to comment Share on other sites More sharing options...
Tom Atom Posted December 5, 2016 Share Posted December 5, 2016 Hi, not completely sure about your problem, but this sets 0,0 coordinates into center of screen: // set world and camera this.world.setBounds(-this.game.width / 2, -this.game.height / 2, this.game.width, this.game.height); this.camera.focusOnXY(0, 0); It is good for single-screen game. If you need to scroll freely anywhere, then set this: this.camera.bounds = null; Link to comment Share on other sites More sharing options...
s4m_ur4i Posted December 5, 2016 Author Share Posted December 5, 2016 thanks you, this.camera.focusOnXY did it Link to comment Share on other sites More sharing options...
Recommended Posts