Workshopping MatterJS physics having played mostly with Arcade - and I’m immediately confused about the best approach.
So. I have a set of bodies that exist in concentric circles (see screenshot); the idea is that all these bodies will rotate around the centre. The screenshot shows those polygons rendered out with a GameObject.Graphics
instance - and I want to attach those shapes as MatterJS bodies.
If I try this, using scene.matter.add.fromVertices
, all the objects fly away from each other (even when isStatic: true
) but MatterJS seems like a significant learning curve vs. Arcade so I’m a bit lost
What’s the best approach here to arrange these bodies, so that they don’t fly away - and I can rotate them all arond the centre. matter.add.constraint
seemed like a good idea, but the pivot point appears to itself be a Matter body - also causing the bodies to scatter…
So here is the simple rendering of Polygonal points with graphics objects…
First attempt to simply add as static bodies in Matter…