ghamantorr Posted July 25, 2014 Share Posted July 25, 2014 Hi, i found questions about resize canvas and with the forum answers i could resize mine but i realize the physics world is not resizing, it's possible to resize the world without destroy and create a new one? I'm using phaser to create a website, if someone enters the website and maximize after all the physics bodies stays in the same position and i wanna change bounds to the browser's bounds. My english is terrible but i uploaded what i have right now: http://okiru.com.br/clientes/osquindins/test/ Thank you very much. ps: i'm using phaser version 2.0.1, when i update to version 2.0.6 the world bounds don't collide with the sprites, am i missing something? same code with phaser 2.0.6: http://okiru.com.br/clientes/osquindins/test/206/ Link to comment Share on other sites More sharing options...
ghamantorr Posted July 25, 2014 Author Share Posted July 25, 2014 i found a solution to world bounds using:game.physics.p2.setBoundsToWorld(true, true, false, true, false);and found a solution to resize physics world using:game.physics.p2.setBounds(0, 0, width, height, true, true, false, true, false); Link to comment Share on other sites More sharing options...
Recommended Posts