Joint: Swing & Twist?

Hi!
I’m using a configurable joint’s angular x drive, velocity mode.

The documentation say sthis about the angularXDrive:

Only used if Rotation Drive Mode is
Swing & Twist.

What is Swing & Twist and how do I use it? I havn’t found and documentation about this.

I’m making a dragable door, but the door never moves even if it has a target velocity and position spring.

Thanks!
Cheers

This is an old question, and I’m not one to often necro, but given the number of folks following and the number of people that may land here in the future I thought this answer warranted. The documentation around this is indeed lacking. What I have found (largely from trial and error) is that “swing and twist” refers to RotationDriveMode.Slerp.

When configuring your joint be sure to setup the rotation drives like so:

joint.rotationDriveMode = RotationDriveMode.Slerp;
joint.angularXMotion = ConfigurableJointMotion.Free; 
joint.angularYMotion = ConfigurableJointMotion.Free;
joint.angularZMotion = ConfigurableJointMotion.Free;
    
joint.angularYZDrive = new JointDrive
{
        positionSpring = strength,
        positionDamper = damper,
        maximumForce = maxForce
};
    
joint.angularXDrive = new JointDrive
{
        positionSpring = strength,
        positionDamper = damper,
        maximumForce = maxForce
};

Be sure to replace strength, damper and maxForce with values that make sense for your use case.

Lastly a brilliant breakdown of configurable joint can be found here.