File tree Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1439,7 +1439,7 @@ void ProjectSettings::_add_builtin_input_map() {
14391439 }
14401440
14411441 Dictionary action;
1442- action[" deadzone" ] = Variant (InputMap::DEFAULT_DEADZONE );
1442+ action[" deadzone" ] = Variant (InputMap::DEFAULT_TOGGLE_DEADZONE );
14431443 action[" events" ] = events;
14441444
14451445 String action_name = " input/" + E.key ;
Original file line number Diff line number Diff line change @@ -1104,7 +1104,7 @@ JoyAxis InputEventJoypadMotion::get_axis() const {
11041104
11051105void InputEventJoypadMotion::set_axis_value (float p_value) {
11061106 axis_value = p_value;
1107- pressed = Math::abs (axis_value) >= InputMap::DEFAULT_DEADZONE ;
1107+ pressed = Math::abs (axis_value) >= InputMap::DEFAULT_TOGGLE_DEADZONE ;
11081108 emit_changed ();
11091109}
11101110
Original file line number Diff line number Diff line change @@ -55,6 +55,8 @@ class InputMap : public Object {
5555 };
5656
5757 static constexpr float DEFAULT_DEADZONE = 0 .2f ;
58+ // Keep bigger deadzone for toggle actions (default `ui_*` actions, axis `pressed`) (GH-103360).
59+ static constexpr float DEFAULT_TOGGLE_DEADZONE = 0 .5f ;
5860
5961private:
6062 static InputMap *singleton;
You can’t perform that action at this time.
0 commit comments