How to get configurable joint to observe limits?

Ok so I am using a configurable joint on a humanoid ragdoll. I’ve set up the joints to be locked on all axis’s except for the one’s I want them to be able to move on, and I have set those to limited. The locked axis appear to work fine, however, the limited axis appear to be ignored…

Specifically the knees are the most noticeable problem. The knees are set to be able to bend 90 degrees one way, but 0 degrees the other (as knees do). (so Angular X motion is the only one set to limited, all others are set to locked. The High Angular limit X equals 90 and the lower angular X limit equals 0. Bounciness and Contact Distance are both set to zero) When the character falls over, the knees often bend the wrong way. Not always though, it seems like it’s acting as if the limits aren’t even there. I’ve double checked to be sure that I have the limits set correctly (don’t have them backwards etc.).

I’ve tried setting the Angular X Limit and Angular YZ Limit springs to as high as 200, and as low as 0 with no noticeable effect,

I’ve even set Projection Mode on the joint to Position and Rotation, and setting Projection Angle to 1 which, if I am reading the documentation correctly, should FORCE the joint to ignore physics and snap back to the limits if it goes past them by 1 degree, and it still seems to do nothing.

Am I missing something? Feels like the configurable joint is pulling a Pirates of the Caribbean and viewing the constraints as “guidelines…” How do I get the configurable joint to observe the limits?

Ok, I figured out the solution. Seems I wasn’t going high enough when messing with the Angular Limit Springs. Spring has to be set to at least 360 to have enough power to force the joint back into the correct position. Less than that and it will use a far too gentle touch, like trying to gently press a nail into the wall with your finger rather than hitting it with a hammer, until you press with enough force, there is no noticeable difference between 1lb and 10.

What made it more confusing is that setting Spring to zero is apparently shorthand for “default”, unless Damper is set to anything, in which case Spring appears to actually be treated as zero.

So for the effect I am trying to achieve, the only two viable settings are either leaving both Spring and Damper at zero, or I suppose if I wanted to allow some bend, setting Spring up to 360

Setting Damper reduces how fast it can spring back so I found a Damper equal to the spring produces very stable results (unlikely to flip out) but allows objects pressing against the rigidbodies to easily move them past their limits. For example, if using a hanging chain, pushing the chain past its limits in this configuration will look like the chain just swings back to the target rotation with gravity, with no noticeable acceleration. However it won’t pass the limits on it’s own without being forced by another collision.

Setting Damper to half the Spring value results in the chain springing back with noticeable force. Again, it will be allowed to be pushed past it’s limits, but it will use reasonable force to push it back into place.

So yeah. For my project I’m going to go with probably somewhere in the 75% spring power damper, since I’m allowing the player to pick up the ragdoll and swing them around, so I want the extra stability. If the ragdoll isn’t going to be under such extreme forces I would recommend higher spring and lower damper settings to increase how much power the joints use to keep within their ranges. Or just set Spring and Damper to 0 wich seems to put it into a mode where it will use maximum force without tripping into infinity errors.