Rotating flaps, fins etc, on a plane gradually.

Hello people,

I have been searching around for a while, but to no awail.
I am trying to make the fins of a plane rotate, until they have reached a specific angle, then stop.
However, no matter how much I have tried, I can’t come to a solution.

public Transform pitch;
public Transform yaw;
public Transform rollL;
public Transform rollR;

I have these public transforms to use, and I am using an axis as input so that I can make them pitch correctly with controllers later, when I figure this out.
So I want to use an if-statement like this:

if (Input.GetAxis("Pitch")  <  0)

I have added these in the input-manager, and it works correctly with a negative, and postive button.
I can’t for the life of me figure out how I can get them to rotate correctly, and then stop.

Any help would be great!

I came up with a solution just before falling asleep last night, and now it seems to be working just fine. It was way simpler than I realized.

float pAngle;
pAngle = pitch.localRotation.x + Input.GetAxis("Pitch") * 25;
pitch.localRotation = Quaternion.Euler(-pAngle, 0, 0);

Since the Axis of the pitch goes between 1, and minus 1, you can get a pretty good rotation with tweaking the “pAngle” variable to you own liking. I’m pretty sure something that looks like this would work great for a controller based car game (Wheels, and turning) as well.