My Motorcycle Physics Need Some Customization

Hello everyone,

I am trying to use these codes you see below on my moto. Actually it works but it is not healthy and i am working on it for long time but i couldn’t make it like i want to have.

            if (Input.GetKey (KeyCode.D)) 
			{	
				euler.z = Mathf.Lerp(euler.z, 40.0f, 0.05f);
				Quaternion motoRotation = Quaternion.Euler(euler);
				transform.rotation = Quaternion.Lerp (transform.rotation, motoRotation, 0.05f);
			}
			
		
			if (Input.GetKey (KeyCode.A))
			{		
				euler.z = Mathf.Lerp(euler.z, 40.0f, 0.05f);
				Quaternion motoRotation = Quaternion.Euler(euler);
				transform.rotation = Quaternion.Lerp (transform.rotation, motoRotation, 0.05f);

			}	

Moto rotates left and right side after i hit “A” or “D” keys but it doesn’t work good. For instance, when i release the key, moto turns the start Z rotation position which is “0”, without smoothing. I want the moto to rotate left and right side smoothly and return back the position when key is released smoothly.

Thanks for your answers from now.

http://unity3d.com/learn/tutorials/modules/beginner/scripting/get-button-and-get-key
Look that, it can help