using System.Collections.Generic
using UnityEngine
//放到摄像机上 (如果想你让摄像机跟随物体移动的话)再说
public class TestScr : MonoBehaviour
{
void Update()
{
float hor = Input.GetAxis("Horizontal")
float ver = Input.GetAxis("Vertical")
transform.position += new Vector3(hor, ver, 0 )
}
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)