Input.GetAxis("Mouse ScrollWheel") Is Jumpy

I am trying to create a throttle system for a player’s movement, and am binding it to the scroll wheel. My current situation is that each time the scroll wheel “clicks” it does not always register as a mouse wheel movement. I am building this off of the FirstPersonController prefab from the standard assets package. I have gotten this solved by using the Event.current system outside of OnGUI() somehow, but when I relaunched Unity it stopped working :/. Not sure how else to fix this. Writing the output of Input.GetAxis(“Mouse ScrollWheel”) just returns a random series of 0, 1, and 2.

Throttle Speed Update Function:

    public void UpdateDesiredTargetSpeed()
    {   
        float e = Input.GetAxisRaw("Mouse ScrollWheel")*10f;
        if(e > 0)
        {
            CurrentTargetSpeed += 5f;
		}
        if(e < 0)
        {
            CurrentTargetSpeed -= 5f;
		}
        if(CurrentTargetSpeed >= 40f)
        {
            CurrentTargetSpeed = 40f;     
        }
        Debug.Log(e);
    }

The way I altered the script has it so that the CurentTargetSpeed variable is the actual speed. Any help is appreciated. As a side note, I am pretty new to unity and c# so I may be missing something obvious.

This question is old, but in case anybody else lands here:
The issue is that you’re assigning the value of the GetAxis directly to float e. GetAxis returns incremental change as opposed to cumulative, so the simple fix in your code would be in line 3 (note the incremental operator as opposed to assignment):

float e += Input.GetAxisRaw("Mouse ScrollWheel")*10f; 

I don’t have access to my computer right now so can’t test this, but this should likely work.