Object Rotation Oscillates between Two Angular Velocities

I have an assembly of rigidbodies attached to each other with unbreakable joints (and no spring joints) that’s allowed to freely move and rotate without interference. And I have a script that can stop the object’s rotation by applying a torque to the object until the rotation rate is almost exactly zero.

The problem is, that once an external force causes the object to rotate, the object oscillates between two different rotational speeds. And the script that is supposed to stop the rotation can’t stop the oscillation. Once the rotation is “stopped,” the oscillation is between no rotation, and a small rotation in the direction that the object was last rotating in. The script uses the angular velocity to decide how much torque to apply to the object to stop the rotation. It appears that the angular velocity remains zero throughout the oscillation cycle.

Every second or two, the object will briefly rotate about a degree or two in a tenth of a second, then stop rotating. When the object has a rotational velocity, the oscillation appears to go between the correct velocity, and some velocity slower than the correct one.

What is causing this oscillation and how do I stop it?,I have an object that can freely rotate without any resistance and a script that applies a torque to the object to halt its rotation. The object is an assembly of rigidbodies (2D) connected to each other with unbreakable joints. The script does kill the object’s rotation, and the inspector confirms that there is no rotational velocity. However, every couple of seconds, the object’s rotation will jump a couple of degrees in the direction that the object was rotating in, and the script is unable to stop it.

What is causing this rotation and how do I stop it?

did you able to solve it?,did you able to solve it. I am having the same issue.