title: Unity-Why is Z axis changing when I move an object on X axis?
body: <p>I am creating a game in which I will be a cube. But when I move my cube on X axis the Z axis changes.
  I've also blocked the X, Y, Z rotation.</p>
  <p>My code:</p>
  <pre><code>using UnityEngine;
  using System.Collections;
  
  public class CubeControl : MonoBehaviour {
      private Vector3 input;
  
      void Update () {
          if(Input.GetKey(KeyCode.D)){
              input = new Vector3(25, 0, 0);
              rigidbody.AddForce(input);
          }
          if(Input.GetKey(KeyCode.A)){
              input = new Vector3(-25, 0, 0);
              rigidbody.AddForce(input);
          }
          if(Input.GetKey(KeyCode.W)){
              input = new Vector3(0, 0, 25);
              rigidbody.AddForce(input);
          }
          if(Input.GetKey(KeyCode.S)){
              input = new Vector3(0, 0, -25);
              rigidbody.AddForce(input);
          }
      }
  }
  </code></pre>