You will likely want to use the Quaternion.Lerp method. The Lerp method returns a linearly interpolated value between the to and from values, based on the t variable you supply. So if I do Lerp(0, 100, 0.5), I’d get 50. If I used .75 I’d get 75, etc.
Your “from” value is the neutral rotation you want when the ship is not banking. The “to” value is the maximum angle you want the ship to tilt to.
The target rotation at maximum tilt can be expressed as a Quaternion with:
// assuming 65 degrees is the maximum tilt you want
var targetRot = Quaternion.AngleAxis(65, shipTransform.forward);
Based on where you are in between the lanes, you will lerp back and forth.
When you are on either lane, you will want
transform.rotation = Quaternion.Lerp(defaultRotation, targetRot, 0);
When you are right in the middle of two lanes, you will want
transform.rotation = Quaternion.Lerp(defaultRotation, targetRot, 1);
For anywhere else, you need to express the current location of the ship as a fraction of the distance to the middle, and use that as the last variable in the Lerp method.
For instance, at 25% and 75% marks, you would use 0.25f;
You can also experiment with Quaternion.Slerp to see if it looks better.