using System.Collections; using System.Collections.Generic; using UnityEngine; public class Spaceship : MonoBehaviour { public float speed=1; public float maxspeed=10; private RigiBody rb; void Start () { rb = gameObject.GetComponent (); } // Update is called once per frame void Update () { transform.Rotate (Input.GetAxis ("Vertical"), 0.0f, -Input.GetAxis ("Horizontal")); transform.position += transform.forward; } }