# Matter.js offset body

**URL:** <https://phaser.discourse.group/t/matter-js-offset-body/2716>\
**Category:** Phaser 3\
**Created:** [June 10, 2019, 8:11am UTC](https://phaser.discourse.group/t/matter-js-offset-body/2716 "2019-06-10T08:11:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tianyagulvke](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/tianyagulvke/32/1408_2.png) [@tianyagulvke](https://phaser.discourse.group/u/tianyagulvke)\
**Post date:** [June 10, 2019, 8:11am UTC](https://phaser.discourse.group/t/matter-js-offset-body/2716/1 "2019-06-10T08:11:19Z")

</div>

[http://labs.phaser.io/view.html?src=src\physics\matterjs\offset%20body.js](http://labs.phaser.io/view.html?src=src%5Cphysics%5Cmatterjs%5Coffset%20body.js)  
hello,  
var triangle = this.matter.add.sprite(400, 100, ‘triangle’, null, {  
shape: { type: ‘fromVerts’, verts: shapes.triangle },  
render: { sprite: { xOffset: 0.30, yOffset: 0.15 } }  
});  
anyone knows why ‘xOffset’ is 0.3 and ‘yOffset’ is 0.15?

---

<div class="post-metadata">

**Author:** ![tianyagulvke](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/tianyagulvke/32/1408_2.png) [@tianyagulvke](https://phaser.discourse.group/u/tianyagulvke)\
**Post date:** [June 10, 2019, 9:00am UTC](https://phaser.discourse.group/t/matter-js-offset-body/2716/2 "2019-06-10T09:00:50Z")

</div>

![triangle](https://global.discourse-cdn.com/free1/uploads/phaser1/original/2X/2/26dbef2f6684477805d505597e32c1287ad488b1.png)  
this is the triangle.png

---

<div class="post-metadata">

**Author:** ![Cannabijoy](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/cannabijoy/32/1511_2.png) [@Cannabijoy](https://phaser.discourse.group/u/Cannabijoy)\
**Post date:** [June 10, 2019, 1:48pm UTC](https://phaser.discourse.group/t/matter-js-offset-body/2716/3 "2019-06-10T13:48:28Z")

</div>

I messed with the numbers, and keeping them as decimals is probably best. I think the numbers should be a little bigger though, because it’s hard to tell what the offset actually does.

---

<div class="post-metadata">

**Author:** ![tianyagulvke](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/tianyagulvke/32/1408_2.png) [@tianyagulvke](https://phaser.discourse.group/u/tianyagulvke)\
**Post date:** [June 10, 2019, 2:07pm UTC](https://phaser.discourse.group/t/matter-js-offset-body/2716/4 "2019-06-10T14:07:47Z")

</div>

I think the offset should be a integer in px.😬
