Ok, found it. The stiffness value has a much different effect as in older Newton.
Changing it from 0.9 to 0.99 fixed my issues
Moderators: Sascha Willems, walaber
JoeJ wrote:I noticed 2 things that are not perfect:
T-Posed Ragdoll lying on its back flat on the ground: Starts sliding at low constant speed.
Joint-picking the ragdoll and lift up: Ragdoll does not come to rest and turns around the picking joint.
This has always been typical for the skeleton.
No big problems, but it would force us to do things like 'turn skeleton off if dead'.
I'll add reproducing this to the joints demo... maybe you can add some damping or whatever to limit those effects.
int NewtonSkeletonContainerAttachCyclingJoint (NewtonSkeletonContainer* const skeletonPtr, NewtonJoint* const jointPtr)
bool PickBody ()
{
//...
if (!kineJoint.m_joint)
{
kineJoint.m_body0 = pickedBody;
kineJoint.m_joint = NewtonConstraintCreateUserJoint (world->world, 6, KCJointCallback, 0, pickedBody, 0);
NewtonJointSetUserData (kineJoint.m_joint, &kineJoint);
NewtonBodySetAutoSleep (pickedBody, 0);
skel = NewtonBodyGetSkeleton(pickedBody);
if (skel) NewtonSkeletonContainerAttachCyclingJoint (skel, kineJoint.m_joint);
}
return 1;
}
void ReleaseBody ()
{
//...
if (kineJoint.m_joint)
{
if (skel) NewtonSkeletonContainerRemoveCyclingJoint (skel, kineJoint.m_joint);
skel = 0;
NewtonJointSetUserData (kineJoint.m_joint, NULL);
NewtonJointSetDestructor (kineJoint.m_joint, NULL);
NewtonDestroyJoint(world->world, kineJoint.m_joint);
kineJoint.m_joint = 0;
kineJoint.m_body0 = 0;
}
}
JoeJ wrote:...After the stars finish falling down, they start jittering on ground.
That's worse than the sliding with my ragdoll, but probably the same issue.
Julio Jerez wrote:the thong is that we can increase the convene rate on per joint bases, although I have not expose that yet, I hope is not necessary.
JoeJ wrote:* Instead of Gramm Schmidt, cache old constraint space and rotate it to the new error axis to prevent 'random tangents' - this converts the spinning motion of the regular cross shape to usual jitter, so a little improvement.
Julio Jerez wrote:three link seem to be at the edge where is take a while to go to rest, after for element per link them the residual acceleration never goes to zero, and its gets worse form there.
JoeJ wrote:Julio Jerez wrote:Have you ever thought of tackling the jitter problem with a unique approach independent from solver and even the laws of physics?
a = [ - ks (x2 - x1) - kd * (v2 - v1) - dt * ks * (v2 - v1)] / [1 + dt * kd + dt * dt * ks]
a = - ks (x2 - x1) - kd * (v2 - v1)
Users browsing this forum: No registered users and 39 guests