Hi! I am currently running into an issue while setting up the joints for my to-be ragdoll.
The first thing I do is create two spheres (dynamic not static) and then I make a distanceJoint and attach the two spheres together. I then set a max and min distance, but this never actually effects the distance between the two actors.
As you see here I have two spheres(as bombs) that spawn next to eachother. I can collide into them separately with my character and they will act as if there is not a joint attached to them.
But if I knock one off the map, after it reaches a certain distance it will then pull the other actor and cause a pendulum swing below the map. Proving that there is a joint connecting them.
I have tweaked the numbers dozens of times trying to figure out ways to correct this issue. But no matter what happens I get the same result. I have even tried different joints. Revolute, articulate and spherical joints still react the same when the actors reach this distance(horizontally and vertically). The only joint that does not is a fixed joint, which obviously will not be useful for me when creating a ragdoll. Is there anything I could be missing or have overlooked?
Here is some code:
PxDistanceJoint* joint = PxDistanceJointCreate(*m_CollisionManager.GetPhysXSDK(), &_pxRigActor1, _pos1, &_pxRigActor2, _pos2); joint->setMaxDistance(0); joint->setMinDistance(0); joint->setDamping(0.1f); joint->setStiffness(100); joint->setDistanceJointFlags(PxDistanceJointFlag::eMAX_DISTANCE_ENABLED | PxDistanceJointFlag::eMIN_DISTANCE_ENABLED | PxDistanceJointFlag::eSPRING_ENABLED); joint->setTolerance(5); joint->setConstraintFlag(PxConstraintFlag::ePROJECTION, true);