So I've been messing around with this lately, for the ones compiling the engine themselves.
Joint.cpp
CreateHinge inside of if(PxRevoluteJoint *hinge=PxRevoluteJointCreate body
Code:
if (body)
{
hinge->setConstraintFlag(physx::PxConstraintFlag::ePROJECTION, body);
hinge->setConstraintFlag(physx::PxConstraintFlag::ePROJECT_TO_ACTOR0, body);
hinge->setProjectionLinearTolerance(10.00f);
hinge->setProjectionAngularTolerance(DegToRad(10));
}
and CreateSpherical inside of if(PxD6Joint *spherical=PxD6JointCreate) body
Code:
if (body) {
spherical->setConstraintFlag(physx::PxConstraintFlag::ePROJECTION, body);
spherical->setConstraintFlag(physx::PxConstraintFlag::ePROJECT_TO_ACTOR0, body);
spherical->setProjectionLinearTolerance(10.00f);
spherical->setProjectionAngularTolerance(DegToRad(10));
}
I think it would probably be better with a separate bool for projection and velocity/angular settings.
in Ragdoll createTry
Code:
REP(T.bones()) {
bone(i).actor._dynamic->setMaxDepenetrationVelocity(0.1);
bone(i).actor._dynamic->setSolverIterationCounts(16, 8);
}
before
Has helped stabilize it immensely, atleast it isn't exploding anymore(flying everywhere), and it doesn't seem to leave a super jittery popping on the neck/head bones, still not quite happy with it but atleast right now it is somewhat usable.