The player can freely add more modules, like thrusters. However, if you add too much modules, things somehow start to shake violently when an impulse is applied. The structure becomes more volatile, the more modules are attached, sometimes getting so severe that modules get twisted out of place. Here are some images demonstrating this
I currently have each module connected like this:
Code: Select all
PinJoint.new(anchr_a.shape.body, anchr_b.shape.body, Vec2.new(0, 0), Vec2.new(10, 0))
PinJoint.new(anchr_a.shape.body, anchr_b.shape.body, Vec2.new(10, 0), Vec2.new(0, 0))
PinJoint.new(anchr_a.shape.body, anchr_b.shape.body, Vec2.new(0, 0), Vec2.new(0, 10))
If I add more constraints, the structure becomes more volatile. But if I remove constraints, the modules can move too freely, sliding alongside their mount points. I just want to 'weld' the modules together.
Any ideas how to fix this? Thank you in advance.