I have noticed some shaking when connecting bodies with the 6dof constraint.
As a simple test I added two boxes (one static) with the 6dof halfway between them, and all limits locked to zero (pretty much acting as a fixed constraint).
To reproduce, dump this into the StandardJoints Add6Dof function:
- Code: Select all
static void Add6DOF (DemoEntityManager* const scene, const dVector& origin)
{
dVector size (1.0f, 1.0f, 1.0f);
NewtonBody* const base = CreateBox(scene, origin + dVector (0.0f, 5.0f, 0.0f, 0.0f), size);
NewtonBody* const box0 = CreateBox(scene, origin + dVector (4.0f, 5.0f, 0.0f, 0.0f), size);
NewtonBodySetMassMatrix(base, 0.0f, 0.0f, 0.0f, 0.0f);
dMatrix pinMatrix(dGetIdentityMatrix());
pinMatrix.m_posit = origin + dVector(2.0f, 0, 0, 0);
Custom6DOF* const joint0 = new Custom6DOF (pinMatrix, pinMatrix, box0, base);
//joint0->SetAngularLimits (dVector (-angle, -angle, -angle, 0.0f), dVector (angle, angle, angle, 0.0f));
#ifdef _USE_HARD_JOINTS
NewtonSkeletonContainer* const skeleton = NewtonSkeletonContainerCreate(scene->GetNewton(), base, NULL);
NewtonSkeletonContainerAttachBone(skeleton, box0, base);
NewtonSkeletonContainerFinalize(skeleton);
#endif
}
Will the current development solve this issue?
Thanks
James