public class PlaneMovement : MonoBehaviour {
public float moveSpeed = 10.0f;
// Use this for initialization
void Start () {
}
// Update is called once per frame
public void Update () {
transform.Translate(Vector3.up * Input.GetAxis("Vertical") * Time.deltaTime * moveSpeed);
if (Input.GetKey (KeyCode.W))
{
transform.Rotate (Vector3.right, Space.Self);
}
if (Input.GetKey (KeyCode.S))
{
transform.Rotate (Vector3.left, Space.Self);
}
if (Input.GetKey (KeyCode.RightArrow))
{
transform.Rotate (Vector3.up, Space.Self);
}
if (Input.GetKey (KeyCode.LeftArrow))
{
transform.Rotate (Vector3.down, Space.Self);
}
if (Input.GetKey (KeyCode.A))
{
transform.Rotate (Vector3.back, Space.Self);
}
if (Input.GetKey (KeyCode.D))
{
transform.Rotate (Vector3.forward, Space.Self);
}
}
}