How can I simulate the smoothness of the Input.GetAxis?
Hello everyone, I'm creating a game not serious, but to collect all I know about Unity (Fp type) and is that what I am now is on a custom input manager, so that the player can modify the controls to your taste, and I have a problem and that the variables of type "KeyCode" that are going to be modified depending on what the player chooses, can be used for the parts where I have type code if (Input.GetKey ( KeyCode)) {perform action} (I use it for the jump and for the action of bending over) but it does not work for the Input.GetAxis, (which I use for the movement of the player) ... I tried to make my own input.getaxis, making pressing a keycode varies the number of a variable type float to 1, 0 and -1 depending on whether you press W or if you press S but the movement is very ugly, it is not smoothed as is the Input.GetAxis, since that does not change from 0 to 1 abruptly, it changes gradually, even though the smoothness is very quick, it shows, and I do not know how it does r this "softness" in the get axis that I create, or there is some way that the input.getAxis works with an Input.GetKey to replace the KeyCode with a variable which if it can be modified (of type KeyCode), I hope have explained me well and can help me: p
Your answer
Follow this Question
Related Questions
GetKeyDown Not Functioning When Two Unrelated GetKeys are True 0 Answers
What is the difference between Getkey and Getkeydown (C#) 1 Answer
GetKeyUp does not get called sometimes. 1 Answer
need help badly 2 Answers
Input Keyboard GetAxis not working 0 Answers