Best way to make a movement script, taking all input.

Hi I was wondering what is better than transform.position for movement, so any input is accepted (no pun intended :slight_smile: )

I also want to point out that directly changing transform.position effects how physics work, so thats mainly why im posting.

http://angryant.com/2014/03/07/Moving-in-Unity/

I use transform.Translate to move my character. I dont know if it is the best way but it works well for me

Code Example: C#

private float speed = 20f;

void Update()
{
    if(Input.GetKey(KeyCode.D)) //get input
    {
        transform.Translate(Vector3.right * speed * Time.deltaTime); //move the character to the right while 'D' is pressed
    }
}