标签:orm float ati nta cto speed transform horizon input
一,如下代码
float h = Input.GetAxis("Horizontal"); float v = Input.GetAxis("Vertical"); Debug.Log(h); transform.Translate(new Vector3(h, 0, 0) * Time.deltaTime * speed); transform.Translate(new Vector3(0, v, 0) * Time.deltaTime * speed);
二,transform来使用该游戏对象移动
标签:orm float ati nta cto speed transform horizon input
原文地址:https://www.cnblogs.com/May-day/p/8870816.html