I'm trying to build a flight simulation. I have an aircraft comprised of rigid bodies, connected by hinge joints. The wings and fins are connected to the fuselage and there is a control surface connected to each wing/fin. Just to test the hinges, I am applying gravity and a slight upward force to each rigid body, to simulate gravity and some slight lift. The rigid bodies all have different masses as on a real aircraft, so the net force acting on each is different, but not drastically so. The largest mass ratio between different rigid bodies is smaller than 100:1.
What happens is, the aircraft gradually falls, as it should, because the gravity is much stronger than the lift. Initially, everything looks good, although there is some slight vibration. But the vibration gradually gets worse, and becomes a visible oscillation. The fins and control surfaces visibly begin to move further and further off their axes and the joints appear to be stretching and contracting like a spring. And the fuselage, which the wings/fins are attached to oscillates in unison. Eventually the oscillation becomes severe enough that the whole system "explodes" with the fuselage rotating at a tremendous rate and the other rigid bodies flying around chaotically.
So, is there any simplistic way to get all of this under control? Some way to dampen these oscillations, or firm up the hinges? I experimented with giving the fuselage much more inertia than the other components, but that doesn't seem to help at all. I have set a limit for each hinge, like hinge->setLimit(0, 0, 0.9, 0.3, 0.1), and experimented with less restrictive limits and even no limits, and get similar results no matter what. I have also disabled collisions between linked bodies with dynamicsWorld->addConstraint(hinge, true);
Any help is appreciated. I'm sure my aircraft won't work at all if it can't even handle gravity and a small amount of lift.