I’ve been struggling for days trying to find the formula Input.GetAxis uses to calculate its return value. If I were to create an Input.GetAxis replica (which in fact I am), how would I calculate the return value based on some parameters:
- sensibility (float)
- Gravity (float)
- positive axis key (KeyCode)
- negative axis key (KeyCode)
- Dead (float)
In my code, when I press the positive axis key and hold it, Input.GetAxis returns (in FixedUpdate) a number like 0.1892838 then this number increases (seems randomly) until reaches 1. I know that the returned value is not random (is it?). What is the formula Input.GetAxis uses to calculate the value?