Space shooter tutorial, space ship keep moving and has interia

I just follow the tut and make my space ship move. However, it seems like the ship has a strong inertia and keeps moving even I release the move key. I hope my ship could stop as long as I release the move key. I am wondering why is it happening since I just follow the tut and get a different result. Here is my code:

public class GameController : MonoBehaviour {

private Rigidbody rb;
public float speed;

void Start() {
    rb = GetComponent<Rigidbody>();

void FixedUpdate() {
    float moveHorizontal = Input.GetAxis("Horizontal");
    float moveVertical = Input.GetAxis("Vertical");

    Vector3 movement = new Vector3 (moveHorizontal, 0.0f, moveVertical);
    rb.AddForce(movement * speed);



don’t use AddForce. Use velocity. Or if you want to stick with the accelerating, write another if that checks for no given Input and then set rb.velocity to 0 :wink: