# Crear un circulo con sprint internos que colisionen

**URL:** <https://phaser.discourse.group/t/crear-un-circulo-con-sprint-internos-que-colisionen/6424>\
**Category:** Phaser 3\
**Created:** [May 24, 2020, 11:13pm UTC](https://phaser.discourse.group/t/crear-un-circulo-con-sprint-internos-que-colisionen/6424 "2020-05-24T23:13:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ManuelVR461](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/manuelvr461/32/3417_2.png) [@ManuelVR461](https://phaser.discourse.group/u/ManuelVR461)\
**Post date:** [May 24, 2020, 11:13pm UTC](https://phaser.discourse.group/t/crear-un-circulo-con-sprint-internos-que-colisionen/6424/1 "2020-05-24T23:13:52Z")

</div>

Quisiera que alguien pudiera ayudarme. me gustaria crear un circulo y dentro de el colocar varios sprites que colisicionen entre si y no se salgan del circulo…

ya he intentado hacerlo con contenedor. con graficos y con imagenes pero no logro hacerlo.

![image](https://global.discourse-cdn.com/free1/uploads/phaser1/original/2X/b/becf83ea95346db628d7f717274e6fe856004177.png)

---

<div class="post-metadata">

**Author:** ![Darko](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/darko/32/3335_2.png) [@Darko](https://phaser.discourse.group/u/Darko)\
**Post date:** [May 25, 2020, 9:15pm UTC](https://phaser.discourse.group/t/crear-un-circulo-con-sprint-internos-que-colisionen/6424/2 "2020-05-25T21:15:29Z")

</div>

Hi, I don’t know either how to do a physics circle containing other bouncing physics, maybe someone with more knowledge on phaser physics.  
I was just playing around and this is just an idea on how to create that circle if it helps…

```javascript
var circle = new Phaser.Geom.Circle(400, 300, 300);
var circle2 = new Phaser.Geom.Circle(400, 300, 290);
var points = circle.getPoints(64);
var points2 = circle2.getPoints(64);
var circlebody = "";
for (var i = 0; i < points.length; i++) {
  circlebody += points[i].x + " " + points[i].y + " ";
}
for (var j = points2.length - 1; j >= 0; j--) {
  circlebody += points2[j].x + " " + points2[j].y + " ";
}
circlebody += points2[points2.length - 1].x + " " + points2[points2.length - 1].y + " ";
circlebody += points[points.length - 1].x + " " + points[points.length - 1].y + " ";
circlebody += points[0].x + " " + points[0].y;
var poly = this.add.polygon(400, 300, circlebody, 0xffffff, 1);
this.matter.add.gameObject(poly, { shape: { type: "fromVerts", verts: circlebody, flagInternal: true } });

```
