Input.GetAxis and Input.GetAxisRaw return the exact same value

I need the non-smoothed value of an analog joypad axis (Logitech G29 in this case). I tried using Input.GetAxisRaw for that but I still get a smoothed/filtered value which is affected by the Gravity and Sensitivity settings in Input Manager. I’m making a driving game and all driving controls (steering, throttle, brake and clutch) have a delayed response because of that.

I found out that Input.GetAxis and Input.GetAxisRaw return the exact same value with the following code that results in 0 (meaning the values are equal). Changing Sensitivity and Gravity doesn’t affect the result.

Input.GetAxisRaw("Throttle Axis") - Input.GetAxis("Throttle Axis")

Is this a bug or have I misunderstood the difference between the two functions? My assumption is that GetAxisRaw should return the exact axis value reported by the joypad but it doesn’t seem to do that.

I’m not entirely sure, but I’m guessing the smoothing only works on Digital Inputs, not Analog, and whatever delayed response you’re getting is from something else.

The question is where do you get this result? If you put this in a Debug.Log and in the Update method, and you slowly activate the joy, you should see difference. When you are at the fully activated ends, both should be either +1 or -1 and both should be 0 when they are in the middle.

Thanks for the replies.

I wonder what might be causing such delay. The G29 works fine in all other games I’ve played with it so I guess it isn’t the device or the driver. I’ve also double checked my script to see if I had implemented and forgotten a smoothing filter of my own but didn’t find any.

I tried that now. Tried moving the monitored axis back and forth at different speeds. 0 is the only value I ever get (from Input.GetAxisRaw(“Throttle Axis”) - Input.GetAxis(“Throttle Axis”) that is). Hopefully the picture I put below is visible.

Do you ever get any other number than 0 from either of the Axis or AxisRaw? Not the difference between them, but from the actual Axis? Is it possible you aren’t getting the proper Axis?

I would do what Lurking-Ninja said but checking with better Debug Logs, this would probably give you more insight to what Ninja’s looking for

Debug.Log("Get Axis Raw: " + Input.GetAxisRaw("Throttle Axis") + " | Get Axis: " + Input.GetAxis("Throttle Axis"));

Yes, both functions return a value that eventually represents the position of the physical analog control (eg. the accelerator pedal on the G29). By “eventually” I mean the value gradually climbs/falls over time until it reaches the target value (the actual position of the analog controller). I confirmed that by outputting the GetAxis/-Raw value into the Game-window using the GUI system.

Edit: I’m also able to actually accelerate/brake/steer/use clutch in the simulated vehicle using the G29 so the selected axes shouldn’t be incorrect.