x


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

more ▼

asked Feb 08 '10 at 03:09 PM

bOrange gravatar image

bOrange
27 3 4 8

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

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.

more ▼

answered Feb 08 '10 at 04:17 PM

jonas echterhoff gravatar image

jonas echterhoff ♦♦
9.8k 7 23 104

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 :)

Feb 08 '10 at 04:56 PM bOrange

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.

Feb 09 '10 at 03:30 PM runevision ♦♦

ok! sorry for the delay.

Feb 11 '10 at 04:18 PM bOrange
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x954
x195

asked: Feb 08 '10 at 03:09 PM

Seen: 2986 times

Last Updated: Feb 08 '10 at 03:09 PM