# Physics body vertices

**URL:** <https://phaser.discourse.group/t/physics-body-vertices/9160>\
**Category:** Phaser 3\
**Created:** [March 22, 2021, 9:42am UTC](https://phaser.discourse.group/t/physics-body-vertices/9160 "2021-03-22T09:42:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_AndrewValley](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/_andrewvalley/32/4964_2.png) [@\_AndrewValley](https://phaser.discourse.group/u/_AndrewValley)\
**Post date:** [March 22, 2021, 9:42am UTC](https://phaser.discourse.group/t/physics-body-vertices/9160/1 "2021-03-22T09:42:19Z")

</div>

Can anybody supply a working example of loading a Jason object of vertices for creating a physics body in phaser3/matterjs? Or more specifically passing the Jason data into this.matter.add.sprite(100,300, ‘this sprite’, {shape: Shapes.the shape})? I’m having a heck of a time with it just trying to create a capsule collider.

---

<div class="post-metadata">

**Author:** ![Calabi](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/calabi/32/3712_2.png) [@Calabi](https://phaser.discourse.group/u/Calabi)\
**Post date:** [March 24, 2021, 10:31pm UTC](https://phaser.discourse.group/t/physics-body-vertices/9160/2 "2021-03-24T22:31:52Z")

</div>

Hi, here is a codepen which shows how you can create a matter polygon from an array of vertices.

https://codepen.io/Calabi/embed/preview/vYgNXQP?height=300&slug-hash=vYgNXQP&default-tabs=js,result&host=https://codepen.io
