Making a character "stand up"

I have a character who gets thrown around a lot, and when he lands on the ground I want him to start rotating until he is standing up, kind of like Mutiny.
So far I’ve tried:

  • Tweening his Transform rotation - that creates weird physical movements.
  • Tweening his RigidBody2D rotation - the character starts rotating for no apparent reason.
  • Changing his center of mass when he lands on the ground - he starts bouncing back and forth
  • Point 3 + increasing his inertia - it works, but looks bad.

Any other ideas?

Given that the rotation of the character will be completely random after it lands, and assuming you may have a predetermined stand-up rotation, the following may be useful

Quaternion.RotateTowards(transform.rotation, neededRotation, Time.deltaTime * 10f);

My stand-up rotation is 0, and like I said tweening the Transform’s rotation results in weird physics.

Never modify the Transform, use the Rigidbody2D API. If you’re tweening then drive it with MovePosition/MoveRotation. In 2D this works gracefully for both Dynamic and Kinematic bodies although it won’t stop Dynamic ones from colliding with things so it won’t always get to the requested position/rotation.

Modifying the transform causes the body pose to be instantly updated to a new pose when the simulation starts; this can be bad.

Also, always use the Rigidbody2D.position and Rigidbody2D.rotation as the authority on the pose when reading the pose and NOT the Transform. These two can be different if you’re using interpolation or extrapolation. The pose authority is always with the Rigidbody2D.