title: Adding force to a constantly moving object
body: <p>'ve been working on a Unity 3D game which takes place in 3D space. I can move up and down, left and right while constantly moving in the Z axis. I wanted to be able to rotate my Player gameObject with Q and E buttons to move in curves.
  In regular 3D game this isnt a problem, but how do I make my Player gameObject constantly move the way its facing?</p>
  
  <p>This is my current code, I can only go up,down,left,right while constantly being pushed in Z axis.</p>
  
  <pre><code>public float moveSpeed;
  private Vector3 input;
  private float maxSpeed = 10.0f;
  private float bloodStream = 0.5f;
  public float timer = 40.0f;
  
  
  
  void Update () {
      if (Time.timeSinceLevelLoad &gt;= timer)
      {
          while (bloodStream &lt;= 0.75f)
          {
              bloodStream += Time.timeSinceLevelLoad / 10000;
          }
      }
      if (Time.timeSinceLevelLoad &gt;= timer + 40.0f)
      {
          bloodStream = 0.5f;
      }
      input = new Vector3(Input.GetAxisRaw("Horizontal"), Input.GetAxisRaw("Vertical"), bloodStream);
      if (GetComponent&lt;Rigidbody&gt;().velocity.magnitude &lt; maxSpeed)
      {
          GetComponent&lt;Rigidbody&gt;().AddForce(input * moveSpeed);
      }
  </code></pre>