- Home /
input panel - key pressing
hello everyone I'm having a problem with the definition of input key.
I defined the key "a" and "s" on the Input panel, that later will be used to rotate an GameObject. The problem is that it only detects the input if I press (and realize) the key. If i press the key continuously it does nothing. The pre- defined "vertical" and "horizontal" input detects the key pressing continuously. How do i make that ?
thanks,
Antony
Answer by jonas-echterhoff · Feb 08, 2010 at 04:17 PM
What code are you using to poll the key input? The easiest way to check if a key is continuously held down is to check the Input.GetKey() or Input.GetButton() methods.
I was using the method Input.GetButtonDown! Thats why i could'n make it work.
Thans for you help and sorry for the stupid question :)
If the answer was helpful to you, please accept the answer by clicking the checkmark icon next to it. This way we can better keep track of which questions have been answered.
Your answer
![](https://koobas.hobune.stream/wayback/20220612055028im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Storing Joystick movements, key depressed time 1 Answer
Text Prompt Problem 1 Answer
Mac OS Russian Keyboard - Input problem 0 Answers
How do you bring up the mobile keyboard without this area? 1 Answer
Problem changing the inputs 2 Answers