Gamepad Stick Sensitivity

Is there currently a way built-in way to set Gamepad Stick Sensitivity?

I would like be able to set a factor that controls how fast the stick position values move to the actual physical stick position.

-Jeff

Yeah, just multiply your input vector by a factor ? What do you want to achieve exactly ?

I was hoping that there would be a "Sensitivity" option under the "Processors" that would take a factor to Lerp to the actual input value. Something equivalent to var position = Vector2.Lerp(ActualPosition, TargetPostion, .1).

This is what I'm doing to achieve what I want, but it would be nice to just have an option in the Processors list for it.

Not sure what you mean by that, but lerping with a constant value is pointless. If you want to scale your input vector by 0.1, there is a scale processor. But then again, having that in your code is much more efficient as you can expose it to users using a UI slider or whatever to adjust the sensitivity at runtime.


I currently perform that "Lerp" within my own update method so the "ActualPosition" is always "Chasing" the TargetPosition. I think this is similar to how Sensitivity worked with the old input system.
I think it would make sense to have this sensitivity setting available within the action editor... but then maybe that's not possible with the way the new input system works.

I also miss the sensitivity and gravity settings in the new InputSystem.

Indeed, the old Input system doesn't apply a Lerp operation, but a MoveTowards at a given rate:

  • sensitivity when TargetPosition is farther from the origin than ActualPosition
  • gravity when TargetPosition is closer to the origin than ActualPosition
  • sensitivity+gravity when TargetPosition and ActualPosition are at opposite sides of the origin

I've replicated this system to apply sensitivity and gravity in touch controls. It would be good if we could have this functionality available in the new input system somehow, instead of having to replicate it in our code.

It's on the list to get looked at after 1.0 as part of allowing processors to be stateful. ATM the processing logic at the device level is required to be stateless -- which is a problem for stuff like wanting to gradually lerp. Hopefully, that restriction will go away after 1.0.

@Edy Could you please share the code you used to replicate the old behavior?

@Bencarbon Sure, the actual utility class I use to handle the input is attached. The arguments moveRate and pressRate are equivalent to Sensitivity, and centerRate / releaseRate are equivalent to Gravity.

5850193--621457--InputUtility.cs (2.39 KB)

3 Likes