How target rotation and target angular velocity work in configurable joint ?

Hi,

I can’t figure how to set these things.

For the target rotation, these is already by default a target set by the rigidBody attached to.

If i set rotationDriveMode to slerp, then set positionSpring to a hight value, (why the name is “positionSpring” if its about rotation ?) … the joint rotate the rigidBody to the attached rigidBody rotation. So does the target rotation override something ?

Then, for the target angular velocity, the doc says : " The angular velocity that the joint’s rotational drive should aim to achieve. This is specified as a vector whose length specifies the rotational speed and whose direction defines the axis of rotation."

But in reality, when i set these value while running a test, this seems to change the target rotation, and not the velocity of something. (reproductible when position damper is not zero)

So what do these parameters mean ? How to use them ?
When i try to set target rotation via script (every update or fixedUpdate to follow something else that the attached rigidBody), the new target does nothing to rotation. but if i change it via inspector while running, it set a new rotation. This makes no sense to me.

Configurable joints are confusing because they don’t use local or global rotation, they use joint space. I found these really good extension methods that I use whenever I have to set target rotation.

https://gist.github.com/mstevenson/4958837