我完全是 Unity 的初学者(3 天前下载了 Unity)。我创建了一个简单的游戏,我可以使用这段代码用键盘移动玩家 -
void FixedUpdate () {
float speed = 250;
float moveHorizontal = Input.GetAxis ("Horizontal");
float moveVertical = Input.GetAxis ("Vertical");
Vector3 movement = new Vector3 (moveHorizontal, 0.0f, moveVertical);
GetComponent<Rigidbody>().AddForce (movement * speed * Time.deltaTime);
}
但是,我想在 Android 中玩游戏,为此我需要使用操纵杆。谁能告诉我如何使用 Standard Assets 中的操纵杆?
最佳答案
我有帮助this Asset .还有一个关于实现的视频教程。
关于c# - 如何从 Unity 5 中的标准 Assets 添加操纵杆?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32623860/