I have this code :
{
JointDrive drive = joint.angularXDrive;
drive.positionSpring = spring;
drive.positionDamper = damping;
drive.maximumForce = float.PositiveInfinity;
joint.angularXDrive = drive;
drive = joint.angularYZDrive;
drive.positionSpring = spring;
drive.positionDamper = damping;
drive.maximumForce = float.PositiveInfinity;
joint.angularYZDrive = drive;
UnityEngine.Debug.Log(joint.angularXDrive.positionDamper);
}
public void SetArmSpringAndDamping(float armSpring, float armDamping)
{
SetDrive(BodyParts[HumanBodyBones.LeftUpperArm].Joint, armSpring, armDamping);
SetDrive(BodyParts[HumanBodyBones.LeftLowerArm].Joint, armSpring, armDamping);
SetDrive(BodyParts[HumanBodyBones.LeftHand].Joint, armSpring, armDamping);
SetDrive(BodyParts[HumanBodyBones.RightUpperArm].Joint, armSpring, armDamping);
SetDrive(BodyParts[HumanBodyBones.RightLowerArm].Joint, armSpring, armDamping);
SetDrive(BodyParts[HumanBodyBones.RightHand].Joint, armSpring, armDamping);
}```
The values in editor for the joint drives have updated,
i can see in console that the output is correct for the damper.
yet the changes arent being applied. I originally have the drive values all at 0, after setting to 500 5 for example, and seeing the changes in editor, the physics engine doesnt use them, it still uses 0 0