I only just noticed this but I’m getting wildly different results from joint conversion seemingly post 0.6.x with 0.50.p43.
The culprit seems to be my character/configurable joints dont appear to have any limits after converted, Ive added some gifs to illustrate this. Prior to 0.50, I was getting what I’d assume were correct results from conversion, but now it appears wildly different.
same character
physx - character keels over due to limits as expected
after conversion unity/havok physics - character kind of just deflates like a sad balloon.
Sort of fixed it mealyconventionalbluemorphobutterfly
Had saved some old joint conversion code way back when joints were introduced in the package, which I copied and used for manual entity joint setup.
Replaced the code inside the current “CreateConfigurableJoint” in LegacyJointConversionSystem.cs, and it appears to more or less convert properly.
I’m not using the samples(think we went over this in discord) joint authoring as they aren’t official. If later down the line some ui update breaks the inspector or whatever for those authoring component samples and unity decides never to bother to update it, its one less thing I would rather not have to fix on my own.
Trust me I’ve done the whole shebang of ragdolls from code, but Unity added real actual joint conversion way back before 0.17, but it broke somewhere after that and now its been broken for some time. The dots blitz day mentioned that the idea was to use the physx components as the proper way to author / and some rearchitecture was in the works ( https://discussions.unity.com/t/902468 ).
If there weren’t any joint conversion code aside from the samples this might have more merit, but unity provides builtin stuff that has been broken for quite a while.
Even in the post here suggests to use builtin physx stuff as an alternative - https://discussions.unity.com/t/912395 this person will eventually experience the same result.
If unity doesn’t actually plan to support this workflow of physx joints to dots, it should just be removed outright.
The code I posted here still works as a fix(obviously you will have to rework it a bit to conform with the new bakers) and passes the eye test but as for being an actual correct result I’m not sure as I’m pretty far from being knowledgeable on how joints work.
@thelebaron : We recently confirmed (see other thread here ) that there is a discrepancy in the Character Joint and Configurable Joint behavior when baking them to Unity Physics compared to the built-in physics simulation.
The issue occurs notably with the default stiffness and damping parameters (both zero), in which case Unity Physics physically correctly models the limit with “zero resistance force”, whereas the built-in physics simulates in this case a “default stiff” limit behavior.
I saw that in your replacement code you are simply using “always stiff” parameters within the baker, which would explain why the replacement code fixes the issue for the default parameterization.
We are tracking this problem internally and are working on a solution.