Implementing Roly Poly physics

Hello guys,

I am trying to create a small character with roly Poly physics. So no matter how it falls it always comes back to straight vertical rotation. I tried Hinge joint and other techniques but not getting the right behaviour. Can anyone help me to understand the physics behind it?

Thanks