yegorf1 Posted May 3, 2014 Share Posted May 3, 2014 Hello! I tried to make my game with physics. Prototype you can find here. First goes blue, than red, green, yellow. You can't win or lose, yet. As you can see, I use circles, but I use Phaser.Physics.ARCADE too and it doesn't support circles, so now there're squares instead of circles. How can I fix it? .Sorry for bad english Link to comment Share on other sites More sharing options...
yegorf1 Posted May 3, 2014 Author Share Posted May 3, 2014 Tried to use Ninja physics, but can't collide group with itself and can't remove gravity. Link to comment Share on other sites More sharing options...
valueerror Posted May 3, 2014 Share Posted May 3, 2014 so your way to go would be using p2 physics.. ! Link to comment Share on other sites More sharing options...
yegorf1 Posted May 3, 2014 Author Share Posted May 3, 2014 so your way to go would be using p2 physics.. ! I didn't find how to make circle and collige group with itself. Link to comment Share on other sites More sharing options...
valueerror Posted May 3, 2014 Share Posted May 3, 2014 I didn't find how to make circle and collige group with itself.you mean you've tried p2 physics and didn't find out how to define a collision between 2 circle shapes? have you read the examples ?http://examples.phaser.io/sideview.html search for the p2 collision examples Link to comment Share on other sites More sharing options...
yegorf1 Posted May 4, 2014 Author Share Posted May 4, 2014 you mean you've tried p2 physics and didn't find out how to define a collision between 2 circle shapes? have you read the examples ?http://examples.phaser.io/sideview.html search for the p2 collision examples Yep, thanks for all this. I already found it, but forgot to write here. And now I have problem when I'm trying to drag chip. For that, I need to kill it and reset - I think it's slow and not right way. Link to comment Share on other sites More sharing options...
yegorf1 Posted May 4, 2014 Author Share Posted May 4, 2014 Again did it by myself:if (isInBounds(BOUNDS[chip.owner], chip.y)) { if (frame % 5 == 0) { chip.oldPos = { x: chip.x, y: chip.y }; } chip.body.velocity.x = 10 * (chip.pointer.worldX - chip.x); chip.body.velocity.y = 10 * (chip.pointer.worldY - chip.y);} else { stopDrag(chip, chip.pointer);} Link to comment Share on other sites More sharing options...
Recommended Posts