How to rotate MatterSprite around a point

You have to set the offset of the body manually

gameState.hero = this.matter.add.sprite(200, 200, 'hero');
gameState.hero.setOrigin(0.5,0);
  
let offset= {
  x:0,
  y:-gameState.hero.height/2
}
  
let body = gameState.hero.body;
body.position.x += offset.x;
body.position.y += offset.y;
body.positionPrev.x += offset.x;
body.positionPrev.y += offset.y;
1 Like