Making a ship move

Hello guys

I’m trying to make a small ship game, where the ship floats a bit above the ground, and of course you can move it forward/backward using the arrow keys, and also turn left/right. Think of the ships in WipeOut.

Since I’m new with Unity and I want to test stuff first, what I did was create a cube, set it as a rigidbody, then added a box for collision. All is fine and the object collides with the track mesh.

My question is, how do I apply movement to the ship?

In my code so far I have something like this:

function FixedUpdate () {
  forward = Input.GetAxis("Vertical");
  //Debug.Log ("Moving forward"+forward+" with deltatime="+Time.deltaTime);
  if (forward)
  	rigidbody.AddForce(Vector3.forward * 5000 * forward * Time.deltaTime);
}

This seems to push the ship forward, although irregularly (it’s more like it’s going over a rocky terrain rather then a plain terrain) and of course it does not use the “ship’s”(cube’s) forward vector (Z axis). Once it collides and the cube rotates, pressing Arrow up does not move the cube forward but sideways. Do I or how do I specify that it should use the ship’s Z axis always, and to make the movement constant over a period of time (say 10 meters/second). Do I use Time.deltaTime or something else since I use FixedUpdate and not Update?

I am not very experienced in unity, but you might try importing a character controller (go to assets, import new asset.). The put you ship model under the First Person Controller Tab and deleting the graphics thing in the same tab. then configure click on main camera in that tab and move it to a 3rd person view of your ship. you can also move the ship so it sits a little off the ground or wherever you want it, just make sure you clicking on the children ( i think that’s what there called, again have only been using unity for a month. in other words, the things underneath the first person controller tab in the hierarchy) and only moving them, then your ship can move up/down without actually moving the ship, just position it (if you dont understand just try it and you’ll see what i mean.). I did this for a car, and the only problem i have run into is wile moving the ship you slide and you have to steer with the mouse. Again your taking advice from a noob, so if it works for you then fine if it doesnt oh well lol.