Hi guys,
Why this input not work? if i change it with the letters, works. But i nedd the arrows.
function Update () {
if (Input.GetKey("UpArrow") || Input.GetKey("DownArrow") || Input.GetKey("LeftArrow") || Input.GetKey("RightArrow"))
.
.
.
.
.
}
2 Answers
2
Use this instead.
if (Input.GetKey(KeyCode.UpArrow) || Input.GetKey(KeyCode.DownArrow) || Input.GetKey(KeyCode.LeftArrow) || Input.GetKey(KeyCode.RightArrow))
rohKan
3
You can go with Belbertn or configure the keys in the Input Manager in Edit>Project Settings>Input under Horizontal or Vertical tabs.