Answers for "how to make a character move in unity 2d"

C#
3

how to make a 2d character move in unity 2020

float horizontal = Input.GetAxis("Horizontal");
 float vertical = Input.GetAxis("Vertical");
 float speed = 5.0f;
 
 void Update(){
     transform.position = new Vector3(horizontal, 0, vertical) * speed * Time.deltaTime;
 }
Posted by: Guest on March-06-2020

Code answers related to "how to make a character move in unity 2d"

C# Answers by Framework

Browse Popular Code Answers by Language