YuminekoGame
7/8/2019 - 6:12 AM

Time.deltaTime 移動

[SerializeField]
private float speed;

//  いい例
void Update(){
    var x = Input.GetAxis("Horizontal");
    var z = Input.GetAxis("Vertical");
    
    transform.position += new Vector3(x, 0, z) * speed * Time.deltaTime;
}

//  悪い例
void Update(){
    var x = Input.GetAxis("Horizontal");
    var z = Input.GetAxis("Vertical");
    
    transform.position += new Vector3(x, 0, z) * speed;
}