【Unity】スマホのタップ判定、画面の右側か左側か判断する
Input.GetMouseButton(0)
マウスクリック(タップ)中はtrue
Input.mousePosition.x
マウスの場所(x座標)
Screen.width
スクリーンのサイズ
if (Input.mousePosition.x >= Screen.width / 2)
で、画面の右側にマウスがあるか判定できる
Input.GetMouseButton(0)
マウスクリック(タップ)中はtrue
Input.mousePosition.x
マウスの場所(x座標)
Screen.width
スクリーンのサイズ
if (Input.mousePosition.x >= Screen.width / 2)
で、画面の右側にマウスがあるか判定できる