# Phaser 3.16.2 and 3.24.1 Matterjs sprite body position difference

**URL:** <https://phaser.discourse.group/t/phaser-3-16-2-and-3-24-1-matterjs-sprite-body-position-difference/8195>\
**Category:** Phaser 3\
**Created:** [November 23, 2020, 9:05am UTC](https://phaser.discourse.group/t/phaser-3-16-2-and-3-24-1-matterjs-sprite-body-position-difference/8195 "2020-11-23T09:05:06Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![boo-ga-ga](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/boo-ga-ga/32/4381_2.png) [@boo-ga-ga](https://phaser.discourse.group/u/boo-ga-ga)\
**Post date:** [December 20, 2020, 5:22pm UTC](https://phaser.discourse.group/t/phaser-3-16-2-and-3-24-1-matterjs-sprite-body-position-difference/8195/2 "2020-12-20T17:22:07Z")

</div>

Found the way to fix the issue. When adding matter body to the sprite, I had to set display origin to half of the sprite width/height. Then it was propery aligned with the body:

> ```
> this.sprite
> .setExistingBody(compoundBody)
> .setScale(1)
> .setPosition(x, y)
> .setDisplayOrigin(16, 16);
> 
> ```

Checked in latest stable (3.50.0) version.

---

_[View the full topic](https://phaser.discourse.group/t/phaser-3-16-2-and-3-24-1-matterjs-sprite-body-position-difference/8195)._
