Update position of a Polygon Body

Hi, i am new with Polygons and trying to update the position of a Polygon Body, so it can be reused on a different location in the game. I am creating an infinite parcour with polygons.

Currently creating a polygon with the next following line:

this.current =  this.scene.matter.add.polygon(x, y, this.sides, this.radius, this.options);

When the methode setPosition(newX, newY) is called, the following errormessage appears Uncaught TypeError: this.current.setPosition is not a function .

Does anyone know if it is possible to reuse polygon’s or can they be destroy when they are no longer neccesary?

These are some other things I tried that have failed:

this.current.position.x = x;
this.current.position.y = y;
this.current.positionPrev.x = x;
this.current.positionPrev.y = y;
this.current.parent.position.x = x;
this.current.parent.position.y = y;
this.current.parent.positionPrev.x = x;
this.current.parent.positionPrev.y = y;

I found a dirty workaround! You can manipulate the vertices of a new MatterJS.Body().

With the following line, you are able to change the position of a single vertic: this.current.vertices[0].x = this.current.vertices[0].x - 150;. This workaround issn’t ideal, because a body has 4 vertices and you have to manual change the the position of those vertices. If your MatterJS.Body is rotated, then you also have to measure the angle…

I am glad to here if anyone else has some other suggestion.