- Code: Select all
pHinge = new dCustomHinge(mSourceMatrix, sourceEnt->nBody, targetEnt->nBody);
pHinge->EnableLimits(true);
pHinge->SetLimits(0.0, 0.0);
While this is working fine, and the objects are rigidly attached, I am noticing that, while before attaching, both objects had absolutely no rotations (omegas) around their axis, and as soon as I link them using the above hinge, they are introduced to a minute amount of rotations: (this structure is orbiting Earth at orbital velocities and altitudes)
These rotations get progressively worse and the whole structure starts to wobble and shimmy.
If I break the link (detach the objects), the omegas freeze at a value they were at when they were detached. I can zero out the omegas and they stay there, until I re-attach the objects, at which point the omegas start to increase again.
Any idea what I am doing wrong?
A while ago at one point I was asking similar questions, and Julio suggested that I should collect them into a skeleton for a more stable structure. I did that and it was marginally better, but since I upgraded to the newest build, I noticed that the skeleton implementation has changed drastically and now it seems to be implemented internally (or at least there are no examples in the sandbox).
Also, there was suggestion that, rather than linking the bodies, I should collect them into a compound collision. However, I am unsure if such a structure carries over mass/inertia properties of bodies associated with collisions so that the whole structure is assembled with the correct collective mass/MOI. I peeked into ArticulatedJoints demo but the vehicles are rather complex and not quite what I need.
I would prefer to keep the NewtonBody + RigidHinge set up that I have right now because it seems more intuitive to me (and I've been working with it for a while) but it needs to be stable, rigid, and still. Any idea how to accomplish that?