Is there a way to script a pressure button sensitivity?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By YossafHarz

Hi everyone, just as the title of the thread says I wanna know if there’s a way to do that the character (for example) jump more depending on how much a button is pressed or that the character movement speed vary by the pressure button sensitivity.

Thanks in advance.

:bust_in_silhouette: Reply From: Calinou

Use Input.get_action_strength() to know how much an action is pressed. This only works with gamepad input, not keyboard/mouse input (they’ll return either 0 or 1).

Well. That’s so bad, but thanks for answer.

YossafHarz | 2020-10-13 20:34

To get analog strength from arbitrary keys, you’d need the player to use one of those analog keyboards (like the ones made by Wooting). These are definitely niche products :slight_smile:

Calinou | 2020-10-14 13:32