Spaceship from Space Shooter Tutorial not moving

So I’m trying to follow the instructions to the “Space Shooter” tutorial on my Windows 10 PC and I’m currently stuck on the “Moving the Player” part. I have typed the following script:

using UnityEngine;
using System.Collections;

public class PlayerController : MonoBehaviour {

private Rigidbody rb;

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.velocity = movement;


The script successfully compiles (with 2 CS0618 warnings) but when I try to move the spaceship by pressing the WASD keys, it doesn’t move at all.

This isn’t my first time at attempting the tutorial; I’ve actually made it much further in it on the same computer but I decided to start over due to several errors which I couldn’t figure out how to remove. But back then (only weeks ago), the ship moved with the same script. As far as I know, Unity did not update since then so I can’t understand why this may be occurring.

Could it be that I played around too much with the User Preferences>External Tools? I kept switching from VisualStudio to Xamarin Studio to MonoDevelop as a script editor.
Also, I changed the default program the script opens with in File Explorer from VisualStudio to XamarinStudio, and then to MonoDevelop. However, the external program which Unity uses for the script may be different from the default program I chose to open the script OUTSIDE of Unity. Could this be it, or is it something else?


-create a public variable called speed.
-change rb.velocity = movement; to rb.AddForce (movement * speed);
-assign speed value in Inspector

hope it helps

@doublemax I added the line and it said “FixedUpdate: x=0y=0” in the console window. So i did go to Project Settings>Input and what I notice interestingly is that there is one pair of duplicates of the Horizontal and Vertical axes. Is that normal?

Also, I checked the boxes which said “Snap” and, temporarily, it DID move the spaceship when I pressed the W and S keys but it wouldn’t stop moving immediately after releasing the keys. So then I tried resetting the Input all together. Now no matter what I check, the spaceship won’t move.

What specifically should I look for in Input?