liabru / matter-js

a 2D rigid body physics engine for the web ▲● ■
MIT License
16.7k stars 1.96k forks source link

composite.rotate cannot rotate composite around the point #1223

Open MLH-AIDS opened 1 year ago

MLH-AIDS commented 1 year ago

Screenshot_2023-05-12-20-21-05-30.png Looking at this string of wooden wheels, I created them with a for loop for observation. I used "Composite.rotate" to try to make it rotate around a point, but it was always unsuccessful.

MLH-AIDS commented 1 year ago

No matter how I change the "point", it won't have much impact unless I change the number greater than 100

Composite.rotate(bd, 1, {x:1,y:5}, true)

By the way, how should "rotation" be used? Is it the angle of rotation?