For anyone who is starting off with Unity I put this simple moving script you can attach to your object
var speed = 10;
var player:Rigidbody;
function Start(){
player=transform.rigidbody;
}
function Update(){
if (Input.GetKey ("up")){
player.AddForce (transform.forward * speed);
Debug.Log("iWoundPwn says you're moving");
}
if (Input.GetKey ("down")){
player.AddForce (transform.forward * -speed/1.2);
Debug.Log("iWoundPwn says you're stopping");
}
if (Input.GetKey ("left")){
player.AddForce (transform.right * -speed);
Debug.Log("iWoundPwn says you're moving left");
}
if (Input.GetKey ("right")){
player.AddForce (transform.right * speed);
Debug.Log("iWoundPwn says you're moving right");
}
if (Input.GetKey ("w")){
player.AddForce (transform.forward * speed);
Debug.Log("iWoundPwn says you're moving");
}
if (Input.GetKey ("s")){
player.AddForce (transform.forward * -speed/1.2);
Debug.Log("iWoundPwn says you're stopping");
}
if (Input.GetKey ("a")){
player.AddForce (transform.right * -speed);
Debug.Log("iWoundPwn says you're moving left");
}
if (Input.GetKey ("d")){
player.AddForce (transform.right * speed);
Debug.Log("iWoundPwn says you're moving right");
}
}
please let me know if you get any errors! Thanks.