# Объект (элипс) использующий Маттер физику движеться, но игнорирует колизии

**URL:** <https://phaser.discourse.group/t/topic/6617>\
**Category:** Phaser 3\
**Created:** [June 10, 2020, 11:59am UTC](https://phaser.discourse.group/t/topic/6617 "2020-06-10T11:59:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![IAleks94](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/ialeks94/32/3447_2.png) [@IAleks94](https://phaser.discourse.group/u/IAleks94)\
**Post date:** [June 10, 2020, 11:59am UTC](https://phaser.discourse.group/t/topic/6617/1 "2020-06-10T11:59:36Z")

</div>

I was able to create an ellipse with physics, but for some reason there is no collision (for example, a collision with the walls). I do not have to move the ellipse, I need to check some collisions with it, but I came across the fact that no collisions with it occur. What am I doing wrong ?  
Here is a sample code:  
`
var config = {
type: Phaser.AUTO,
width: 800,
height: 600,
backgroundColor: ‘#efefef’,
parent: ‘phaser-example’,
physics: {
default: ‘matter’,
matter: {
debug: {
renderFill: false,
showInternalEdges: true,
showConvexHulls: true
}
}
},
scene: {
create: create
}
};`

`
var game = new Phaser.Game(config);
function create ()
{
this.matter.world.setBounds().disableGravity();
const ellipse = this.add.ellipse(100,
50,
200,
100);
ellipse.setStrokeStyle(2, 0x1a65ac);
const points = ellipse.pathData.join(’ ')
this.shield = this.matter.add.gameObject(ellipse, {
shape: { type: ‘fromVerts’, verts: points, flagInternal: true }})
ellipse.setVelocity(6, 3);
ellipse.setAngularVelocity(0.01);
ellipse.setBounce(1);
ellipse.setFriction(0, 0, 0);
```
const rectangle = this.add.rectangle(100, 100, 50, 4, 0xaa00aa)
rectangle.property = this.property
const angle = rectangle.pathData.join(' ')  
const laser = this.matter.add.gameObject(rectangle, {shape: { type: 'rectangle', verts: angle,}})
laser.setVelocity(6, 0);
laser.setBounce(1);
laser.setFriction(0, 0, 0);

```
}`

---

<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:** [June 10, 2020, 4:26pm UTC](https://phaser.discourse.group/t/topic/6617/2 "2020-06-10T16:26:45Z")

</div>

Hi, I was playing around with that some time ago, try using the “getPoints” from a Geom…

```javascript
const ellipseGeom = new Phaser.Geom.Ellipse(100, 50, 200, 100);
const points = ellipseGeom.getPoints(64).map((p) => p.x + " " + p.y).join(" ");

```

---

<div class="post-metadata">

**Author:** ![IAleks94](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/ialeks94/32/3447_2.png) [@IAleks94](https://phaser.discourse.group/u/IAleks94)\
**Post date:** [June 11, 2020, 1:51pm UTC](https://phaser.discourse.group/t/topic/6617/3 "2020-06-11T13:51:12Z")

</div>

@Darko You have provided incredible help. This allowed me to move from my point of view. That’s what I have come to at [the moment](https://ialeks94-cloneftl.netlify.app/) (click игра)

---

<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:** [June 11, 2020, 6:01pm UTC](https://phaser.discourse.group/t/topic/6617/4 "2020-06-11T18:01:05Z")

</div>

Glad to hear 🙂 and nice to see the progress!
