movimento gameobject su unity 3d code example
Example: movimento gameobject su unity 3d
if (Input.GetKey(KeyCode.UpArrow))
{
this.transform.Translate(Vector3.up * Time.deltaTime);
}
if (Input.GetKey(KeyCode.DownArrow))
{
this.transform.Translate(Vector3.down * Time.deltaTime);
}
if (Input.GetKey(KeyCode.LeftArrow))
{
this.transform.Translate(Vector3.left * Time.deltaTime);
}
if (Input.GetKey(KeyCode.RightArrow))
{
this.transform.Translate(Vector3.right * Time.deltaTime);
}