Object always torques towards upright

Hey guys, quick question. I’m trying to get a buoyancy effect going for a boat, and what I need is a way to have the boat resist being tilted in the x and z axes. Best case scenario, it would torque hardest around an axis when rotated 180 degrees from the 0 of that axis.

So, what I need is a rigidbody.AddTorque statement that affects the x and z axes, dependent on the signed difference in angle from 0. Any ideas?

Thanks a lot, you guys are great!

I guess the boat has a rigidbody?
lock Z rotation?