Posted on January 25, 2023
This is the command to rotate a Body in Matter.js:
// you have a body const b = Matter.Bodies.rectangle(200,200,100,20) // here how to rotate it: Matter.Body.rotate(b, Math.PI / 4)