Unity C# Player going too fast with Rigidbody2D.AddForce
<p>So I'm trying to make a game in <strong>Unity 5</strong>. It's a <strong>2D game</strong> and I want my character to automatically go forward. But my problem is that since I use <strong>Rigidbody2D.AddForce</strong>, it keeps adding force every frame and I don't want that. I want my <strong>speed</strong> to be at <em>5.0f</em>, not more or less. Is there a way to set a limit or keep a constant speed?</p>

<pre><code>using UnityEngine;
using System.Collections;

public class Player : MonoBehaviour {

public Rigidbody2D player;

public bool grounded = false;
private bool hasJumped = false;

public float movementspeed = 5.0f;
public float jumpforce = 450.0f;

// Use this for initialization
void Start () {
    player = GetComponent&lt;Rigidbody2D&gt;();
}

// Update is called once per frame
void Update () {

    player.AddForce(transform.right * movementspeed);

    // (JumpScript)
}

void FixedUpdate(){

    // (JumpScript)

}
}
</code></pre>