Input: Change default deadzone back to 0.5 for ui_* actions and axis pressed state

Fixes #103360.
Partial revert of changes in #97281 and #99135.
This commit is contained in:
Rémi Verschelde 2025-02-27 17:25:34 +01:00
parent 53faed5351
commit 672fe2487f
No known key found for this signature in database
GPG key ID: C3336907360768E1
3 changed files with 4 additions and 2 deletions

View file

@ -1104,7 +1104,7 @@ JoyAxis InputEventJoypadMotion::get_axis() const {
void InputEventJoypadMotion::set_axis_value(float p_value) {
axis_value = p_value;
pressed = Math::abs(axis_value) >= InputMap::DEFAULT_DEADZONE;
pressed = Math::abs(axis_value) >= InputMap::DEFAULT_TOGGLE_DEADZONE;
emit_changed();
}

View file

@ -55,6 +55,8 @@ public:
};
static constexpr float DEFAULT_DEADZONE = 0.2f;
// Keep bigger deadzone for toggle actions (default `ui_*` actions, axis `pressed`) (GH-103360).
static constexpr float DEFAULT_TOGGLE_DEADZONE = 0.5f;
private:
static InputMap *singleton;