How to keep the force constant in Unity 2D

Hey guys,

I have a Gameobject with a rigidbody2D. I have added a force to fly the object in the height. At the moment when I press the “flight” button for a long time the speed increases, so that the object is flying too fast and not in a constant speed that I want. Simply stated, the longer I hold the flight button down, the faster it flies.
So how can I keep the force constant?

The script that I use in FixedUpdate is:

public float flightSpeed = 13f;

void FixedUpdate () 
	{	

		if (flight)
		{
			rigidbody2D.AddForce(new Vector2(0, flightSpeed));
		}
	}

You can limit the velocity by putting the following in FixedUpdate():

 rigidbody2D.velocity = Vector2.ClampMagnitude(rigidbody2D.velocity, maxSpeed);

You can keep a constant velocity (no faster or no slower) by:

 rigidobyd2D.velocity = rigidbody2D.velocity.normalzied * maxSpeed;

Does anyone have an idea how to solve this problem?

You can do like this:

if(rigidbody.velocity.y < flightspeed)
  rigidbody.AddForce(100, ForceMode.Force);