我使用 unity 制作了一个游戏并将其发布在 google play 商店。但是,它有一些问题。当我开始游戏一段时间时,它无法识别我的触摸。我不知道为什么。这是我让玩家移动的更新函数:
public void Update(){
Vector2 vel=rb.velocity;
float ang = Mathf.Atan2(vel.y,10)*Mathf.Rad2Deg;
transform.rotation = Quaternion.Euler(new Vector3(0,0,ang));
if (Input.GetMouseButton(0))
{
rb.AddForce(Vector2.up * gravity * Time.deltaTime * 1500f);
}
}
我应该使用触摸而不是 Input.GetMouseButton(0) 还是有其他问题? Here 是我的游戏,如果你想查看
编辑:它可以识别但需要太多时间