What is the difference between Getkey and Getkeydown (C#)
I have tried if Input.Getkeydown(Keycode.W)
but it didn't work as it should work (It worked as a Getkeyup) it just get triggered when I get my finger of a key, I want it to stay triggered while I am pressing the key. After this I searched for a solution, then I found a solution to make the code as following if Input.Getkey(Keycode.W)
can anyone explain to me why this is happening? I am a beginner C# programmer so please keep it simple. Thanks for helping.
Answer by Happy-Zomby · Mar 23, 2016 at 11:48 PM
Hi, You can read about get key here -http://docs.unity3d.com/ScriptReference/Input.GetKey.html In short, it returns true as long as you do hold down the key... So if you use it in an update function and if formula it will run every frame until false (when released) Good luck