# Circle physics

## Recommended Posts

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?

##### Share on other sites

Tried to use Ninja physics, but can't collide group with itself and can't remove gravity.

##### Share on other sites

so your way to go would be using p2 physics..  !

##### Share on other sites

so your way to go would be using p2 physics..  !

I didn't find how to make circle and collige group with itself.

##### Share on other sites

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

##### Share on other sites

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.

##### Share on other sites

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);}`

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.