"New" Input System equivalent of Input.GetAxisRaw

Hi there, im using the “new” input system for the first time now and im wondering if i can use an equivalent of the Input.GetAxisRaw(“Horizontal”) funcion. (I’m using it for my animator, so the idle faces the way of the last input).

Should i just use the old Input System or is there any other way to get around this?

You should set the mode to “Analog” (default is DigitalNormalized):
6535976--738638--upload_2020-11-18_15-23-21.png

See (about half way in the page):
https://docs.unity3d.com/Packages/com.unity.inputsystem@1.0/manual/ActionBindings.html

3 Likes

You can just read the value using context.ReadValue() within your callback function for your input axis action, and you can take that value and normalize it and then cache it for use in your Update or FixedUpdate methods.

Alternatively I created a paid asset that lets you use the new input system the same way you would code for the old input manager, so you can use the input action asset but write your code the old way. It has Input.GetAxisRaw and is very easy to use. You can literally use a script written for the old system, add the new Input System from the package manager and then install my asset and it will immediately start using the new Input System with no code changes. There is a link in my signature if you are interested.

1 Like

Oh thanks, that worked for me :slight_smile: