Bobcp Posted September 22, 2015 Share Posted September 22, 2015 Hello, i have a ball and method create, set square size of bodysnowball = snowballGroup.create(1000,game.world.height-100-heightGround, 'snowball');How i can set a round size of body? Thank you Link to comment Share on other sites More sharing options...
rich Posted September 22, 2015 Share Posted September 22, 2015 Use P2 physics and a Circle shape. The above can't be done with Arcade Physics. Link to comment Share on other sites More sharing options...
Skeptron Posted September 22, 2015 Share Posted September 22, 2015 Did you have a look at P2 body.setCircle()? Doc : http://phaser.io/docs/2.4.1/Phaser.Physics.P2.Body.html#setCircle Link to comment Share on other sites More sharing options...
Bobcp Posted September 22, 2015 Author Share Posted September 22, 2015 Thank you, when i change mode to P2, everything like throw to right, why this happen? Link to comment Share on other sites More sharing options...
andersthorborg Posted October 4, 2015 Share Posted October 4, 2015 This happened to me as well. For me it was because the anchor point of the sprites are centered as soon as you apply the physics. So if you position sprite at x:0, its center will be at x:0 meaning that its left side will be out of bounds creating an instant collision. So if you want to position something to the left use x: itemWidth/2. Link to comment Share on other sites More sharing options...
Recommended Posts