Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hi From tutorial 2 I know how to handle keyboard inputs but if you hold down F or G you will notice that the box makes a short break after the first move. Just like when you are holding down a key in a texteditor, there is a short delay before it starts repeating. Now I wonder how you can create smooth movements on keyboard inputs like the FPS camera. |
||||
|
i solved it by creating a boolean that gets true by "on key down" and false by "on key up" |
||||
|
Yes, that's the way it should be done. :) |
||||
|
Have you got an example of how to smooth it? I d'ont see exactly how to use the boolean :/ |
||||
|
Ok, I've found a way to do it. Here is the code for 3 keys :
|
||||
|
The forum seems to remove certain words from the code. "on key down" and "on key up" are dissapeared from the code. |
||||
|
I have implemented this setup in my game, but if I am pressing and holding w to walk and I press another button without releasing w first, and then release the second button pressed and the w, the keyreleased function for w is not fired. I have to press w again to stop it. This happens with all my keys, Any ideas as to why this is happening/how to solve it. Thanks. |
|