【发布时间】:2015-09-17 06:31:32
【问题描述】:
我完全是 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 中玩游戏,为此我需要使用操纵杆。谁能告诉我如何在标准资产中使用操纵杆?
【问题讨论】:
标签: c# android unity3d joystick