title: Player object changes position while rotating
body: <p>First of all: Sorry for my bad English, I'm Dutch.</p>
  
  <p>I'm trying to create a player object that can walk forward and backwards (with the up and down keys), and rotate the player with the right and left keys. But when I press the left or right key, the position of the player changes, it looks like it rotates around a certain point. But it should rotate and stay on the same place, like I do when I turn around.</p>
  
  <p>I have some other small programs, with the same 'move script' and the same inputmanager settings. There it works fine, so I have no idea why it doesn't work this time.</p>
  
  <p>This is my move script, but this script works fine with other programs:</p>
  
  <pre><code>using System.Collections;
  using System.Collections.Generic;
  using UnityEngine;
  
  public class MoveScript : MonoBehaviour
  {
  
      public float speed = 3f;
      public float rotate = 50f;
      private Rigidbody rb;
      // Update is called once per frame
  
      private void Start()
      {
          rb = GetComponent&lt;Rigidbody&gt;();
      }
      void Update()
      {
          if (Input.GetButton("Up"))
              transform.Translate(Vector3.forward * speed * Time.deltaTime);
          if (Input.GetButton("Down"))
              transform.Translate(-Vector3.forward * speed * Time.deltaTime);
          if (Input.GetButton("Right"))
              transform.Rotate(Vector3.up, rotate * Time.deltaTime);
          if (Input.GetButton("Left"))
              transform.Rotate(-Vector3.up, rotate * Time.deltaTime);
          if (gameObject.GetComponent&lt;Rigidbody&gt;().velocity.y &lt; 0.01)
          {
              if (Input.GetButtonDown("Jump"))
                  rb.AddForce(0, 225, 0);
          }
  
      }
  
  }
  </code></pre>
  
  <p>The InputManager settings (also the same as other programs where it works fine):</p>
  
  <p><a href="https://i.stack.imgur.com/6EkIH.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6EkIH.jpg" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/ZWyuu.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZWyuu.jpg" alt="enter image description here"></a></p>
  
  <p>If someone wants a screenshot of something else of my program, you can always ask it of course. I have no idea what the problem could be, if it isn't in the script or the inputmanager.</p>