spencerTL Posted July 22, 2014 Share Posted July 22, 2014 If I use 2.05 my sprites collide with the world bounds (same size as game). If I switch out to 2.07, changing nothing else, it doesn't work. Is there a change to a default value perhaps? I've tried setting and not setting world bounds as well as setting collideWorldBounds. This works in 2.05. I can leave out the final line as true is default but makes no difference in 2.07. Thanks in advance. this.game.world.setBounds(0, 0, 720, 480); this.game.physics.startSystem(Phaser.Physics.P2JS); this.game.physics.p2.gravity.y = 0; this.game.physics.p2.gravity.y = 0; this.game.physics.p2.restitution =0.8; this.game.physics.p2.friction = 0.1; this.hero = this.game.add.sprite(100,100, "w1"); this.game.physics.p2.enable(this.hero ); this.hero.body.fixedRotation = true; this.hero.body.setCircle(30); // this.hero.body.collideWorldBounds = true; //makes no difference in 2.05 or 2.07 Link to comment Share on other sites More sharing options...
Trojan35 Posted July 25, 2014 Share Posted July 25, 2014 Hey SpencerTL, I'm having the same issue as well (but going from .06 to .07). Haven't figured out the issue yet, but noticed this same behavior in the samples as well: http://examples.phaser.io/_site/view_full.html?d=p2%20physics&f=accelerate+to+object.js&t=accelerate%20to%20object use the version selector to switch between .06 and .07. the earlier version has all sprites bouncing off the bounds...the newer version has them ignoring the bounds completely. Hopefully will find the issue soon (or someone will beat me to it ) Link to comment Share on other sites More sharing options...
ghamantorr Posted July 25, 2014 Share Posted July 25, 2014 i had the same issue. you need to set collisionGroup flag to false with: game.physics.p2.setBoundsToWorld(true, true, false, true, false); Link to comment Share on other sites More sharing options...
Dumtard Posted July 25, 2014 Share Posted July 25, 2014 Hello, this happened because of a Pull Request by me. I have now created a new Pull Request https://github.com/photonstorm/phaser/pull/1069 which will fix this issue. Link to comment Share on other sites More sharing options...
Recommended Posts