# How to offset matter physics body

**URL:** <https://phaser.discourse.group/t/how-to-offset-matter-physics-body/13832>\
**Category:** Phaser 3\
**Created:** [December 23, 2023, 11:08am UTC](https://phaser.discourse.group/t/how-to-offset-matter-physics-body/13832 "2023-12-23T11:08:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![NRJ](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/nrj/32/952_2.png) [@NRJ](https://phaser.discourse.group/u/NRJ)\
**Post date:** [December 23, 2023, 11:08am UTC](https://phaser.discourse.group/t/how-to-offset-matter-physics-body/13832/1 "2023-12-23T11:08:30Z")

</div>

I am making a top down car game ,I have offsetted the vertical origin point of the car as the code below, so that i can can rotate the car more realistically and not from the center point of the car but the problem is I am not been able to offset the position of the car body.

```javascript
this.car=this.matter.add.sprite(640,360,'car1',null,{shape: this.carShape.car})
    .setOrigin(0.5,0.8)
    .setScale(1);

```

 ![screenshot](https://global.discourse-cdn.com/free1/uploads/phaser1/original/2X/5/5606d103709b3bd211273963217a2a5169ecf02c.png)

---

<div class="post-metadata">

**Author:** ![NRJ](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/nrj/32/952_2.png) [@NRJ](https://phaser.discourse.group/u/NRJ)\
**Post date:** [December 23, 2023, 11:36am UTC](https://phaser.discourse.group/t/how-to-offset-matter-physics-body/13832/2 "2023-12-23T11:36:47Z")

</div>

Problem Solved !

```javascript
let offset= {
    x:0,
    y:102
}
			
let body = this.car.body;
body.position.x += offset.x;
body.position.y += offset.y;
body.positionPrev.x += offset.x;
body.positionPrev.y += offset.y;

```

Anyone facing the similar problem please refer the link below ,scroll down to the Yannick’s post.

[https://phaser.discourse.group/t/how-to-rotate-mattersprite-around-a-point/1791](https://phaser.discourse.group/t/how-to-rotate-mattersprite-around-a-point/1791)
