title: Relative input but global movement in Unity
body: <p>I'm working on a spaceflight game in unity and stumbled across this simple logical error. I want to be able to add relative movement to my spaceship, but also for it to keep the momentum in that direction when you turn. I've sot a separate script for looking around and movement. Here is my movement source code:</p>
  <pre><code>using System.Collections;
  using System.Collections.Generic;
  using UnityEngine;
  
  public class PlayerMovement : MonoBehaviour
  {
      public CharacterController ship;
  
      public float speed = 0.001f;
  
      float momentum = 0f;
   
      Vector3 velocity;
  
      void Start()
      {
          Cursor.lockState = CursorLockMode.Locked;
      }
  
      void Update()
      {
  
              momentum = momentum + Input.GetAxis(&quot;Vertical&quot;);
              
  
              Vector3 move = transform.forward *  momentum * 0.001f;
  
              ship.Move(move);
  
      }
  }
  </code></pre>
  <p>I know this is a simple question, my brain is just kind of stuck right now. Thanks! ~OwenPT</p>